diff --git a/.agents/skills/cli-admin/SKILL.md b/.agents/skills/cli-admin/SKILL.md index 236500827..2961d68e5 100644 --- a/.agents/skills/cli-admin/SKILL.md +++ b/.agents/skills/cli-admin/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-admin -description: CLI tool (csdk) for the admin API — provides CRUD commands for 32 tables and 16 custom operations +description: CLI tool (csdk) for the admin API — provides CRUD commands for 33 tables and 16 custom operations --- # cli-admin -CLI tool (csdk) for the admin API — provides CRUD commands for 32 tables and 16 custom operations +CLI tool (csdk) for the admin API — provides CRUD commands for 33 tables and 16 custom operations ## Usage @@ -70,24 +70,25 @@ See the `references/` directory for detailed per-entity API documentation: - [org-limit-default](references/org-limit-default.md) - [org-admin-grant](references/org-admin-grant.md) - [org-owner-grant](references/org-owner-grant.md) -- [membership-type](references/membership-type.md) - [app-limit](references/app-limit.md) - [app-achievement](references/app-achievement.md) - [app-step](references/app-step.md) - [app-claimed-invite](references/app-claimed-invite.md) - [org-chart-edge-grant](references/org-chart-edge-grant.md) - [org-limit](references/org-limit.md) +- [membership-type](references/membership-type.md) - [app-grant](references/app-grant.md) - [app-membership-default](references/app-membership-default.md) - [org-claimed-invite](references/org-claimed-invite.md) - [org-grant](references/org-grant.md) - [org-chart-edge](references/org-chart-edge.md) - [org-membership-default](references/org-membership-default.md) +- [org-member-profile](references/org-member-profile.md) - [app-level](references/app-level.md) - [app-invite](references/app-invite.md) +- [org-invite](references/org-invite.md) - [app-membership](references/app-membership.md) - [org-membership](references/org-membership.md) -- [org-invite](references/org-invite.md) - [app-permissions-get-padded-mask](references/app-permissions-get-padded-mask.md) - [org-permissions-get-padded-mask](references/org-permissions-get-padded-mask.md) - [org-is-manager-of](references/org-is-manager-of.md) diff --git a/.agents/skills/cli-admin/references/app-membership.md b/.agents/skills/cli-admin/references/app-membership.md index c58e06de7..8c668a4b5 100644 --- a/.agents/skills/cli-admin/references/app-membership.md +++ b/.agents/skills/cli-admin/references/app-membership.md @@ -12,8 +12,8 @@ csdk app-membership list --where.. --orderBy csdk app-membership list --limit 10 --after csdk app-membership find-first --where.. csdk app-membership get --id -csdk app-membership create --actorId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] -csdk app-membership update --id [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--actorId ] [--profileId ] +csdk app-membership create --actorId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] +csdk app-membership update --id [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--actorId ] [--profileId ] csdk app-membership delete --id ``` @@ -58,7 +58,7 @@ csdk app-membership list --where.id.equalTo --orderBy ID_ASC ### Create a appMembership ```bash -csdk app-membership create --actorId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] +csdk app-membership create --actorId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] ``` ### Get a appMembership by id diff --git a/.agents/skills/cli-admin/references/membership-type.md b/.agents/skills/cli-admin/references/membership-type.md index 657508364..8b1f3189f 100644 --- a/.agents/skills/cli-admin/references/membership-type.md +++ b/.agents/skills/cli-admin/references/membership-type.md @@ -12,8 +12,8 @@ csdk membership-type list --where.. --orderBy csdk membership-type list --limit 10 --after csdk membership-type find-first --where.. csdk membership-type get --id -csdk membership-type create --name --description --prefix -csdk membership-type update --id [--name ] [--description ] [--prefix ] +csdk membership-type create --name --description --prefix [--parentMembershipType ] [--hasUsersTableEntry ] +csdk membership-type update --id [--name ] [--description ] [--prefix ] [--parentMembershipType ] [--hasUsersTableEntry ] csdk membership-type delete --id ``` @@ -58,7 +58,7 @@ csdk membership-type list --where.id.equalTo --orderBy ID_ASC ### Create a membershipType ```bash -csdk membership-type create --name --description --prefix +csdk membership-type create --name --description --prefix [--parentMembershipType ] [--hasUsersTableEntry ] ``` ### Get a membershipType by id diff --git a/.agents/skills/cli-admin/references/org-member-profile.md b/.agents/skills/cli-admin/references/org-member-profile.md new file mode 100644 index 000000000..52b2cf8e2 --- /dev/null +++ b/.agents/skills/cli-admin/references/org-member-profile.md @@ -0,0 +1,68 @@ +# orgMemberProfile + + + +CRUD operations for OrgMemberProfile records via csdk CLI + +## Usage + +```bash +csdk org-member-profile list +csdk org-member-profile list --where.. --orderBy +csdk org-member-profile list --limit 10 --after +csdk org-member-profile find-first --where.. +csdk org-member-profile get --id +csdk org-member-profile create --membershipId --entityId --actorId [--displayName ] [--email ] [--title ] [--bio ] [--profilePicture ] +csdk org-member-profile update --id [--membershipId ] [--entityId ] [--actorId ] [--displayName ] [--email ] [--title ] [--bio ] [--profilePicture ] +csdk org-member-profile delete --id +``` + +## Examples + +### List orgMemberProfile records + +```bash +csdk org-member-profile list +``` + +### List orgMemberProfile records with pagination + +```bash +csdk org-member-profile list --limit 10 --offset 0 +``` + +### List orgMemberProfile records with cursor pagination + +```bash +csdk org-member-profile list --limit 10 --after +``` + +### Find first matching orgMemberProfile + +```bash +csdk org-member-profile find-first --where.id.equalTo +``` + +### List orgMemberProfile records with field selection + +```bash +csdk org-member-profile list --select id,id +``` + +### List orgMemberProfile records with filtering and ordering + +```bash +csdk org-member-profile list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a orgMemberProfile + +```bash +csdk org-member-profile create --membershipId --entityId --actorId [--displayName ] [--email ] [--title ] [--bio ] [--profilePicture ] +``` + +### Get a orgMemberProfile by id + +```bash +csdk org-member-profile get --id +``` diff --git a/.agents/skills/cli-admin/references/org-membership.md b/.agents/skills/cli-admin/references/org-membership.md index f8ea35463..9be13b129 100644 --- a/.agents/skills/cli-admin/references/org-membership.md +++ b/.agents/skills/cli-admin/references/org-membership.md @@ -12,8 +12,8 @@ csdk org-membership list --where.. --orderBy csdk org-membership list --limit 10 --after csdk org-membership find-first --where.. csdk org-membership get --id -csdk org-membership create --actorId --entityId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] -csdk org-membership update --id [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--actorId ] [--entityId ] [--profileId ] +csdk org-membership create --actorId --entityId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--isReadOnly ] [--profileId ] +csdk org-membership update --id [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--actorId ] [--entityId ] [--isReadOnly ] [--profileId ] csdk org-membership delete --id ``` @@ -58,7 +58,7 @@ csdk org-membership list --where.id.equalTo --orderBy ID_ASC ### Create a orgMembership ```bash -csdk org-membership create --actorId --entityId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] +csdk org-membership create --actorId --entityId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--isReadOnly ] [--profileId ] ``` ### Get a orgMembership by id diff --git a/.agents/skills/cli-auth/SKILL.md b/.agents/skills/cli-auth/SKILL.md index 4138131e2..ca71dc6d6 100644 --- a/.agents/skills/cli-auth/SKILL.md +++ b/.agents/skills/cli-auth/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-auth -description: CLI tool (csdk) for the auth API — provides CRUD commands for 7 tables and 23 custom operations +description: CLI tool (csdk) for the auth API — provides CRUD commands for 7 tables and 29 custom operations --- # cli-auth -CLI tool (csdk) for the auth API — provides CRUD commands for 7 tables and 23 custom operations +CLI tool (csdk) for the auth API — provides CRUD commands for 7 tables and 29 custom operations ## Usage @@ -59,27 +59,33 @@ See the `references/` directory for detailed per-entity API documentation: - [email](references/email.md) - [phone-number](references/phone-number.md) - [crypto-address](references/crypto-address.md) -- [connected-account](references/connected-account.md) - [audit-log](references/audit-log.md) - [role-type](references/role-type.md) +- [user-connected-account](references/user-connected-account.md) - [user](references/user.md) -- [current-ip-address](references/current-ip-address.md) - [current-user-agent](references/current-user-agent.md) +- [current-ip-address](references/current-ip-address.md) - [current-user-id](references/current-user-id.md) +- [require-step-up](references/require-step-up.md) - [current-user](references/current-user.md) - [sign-out](references/sign-out.md) - [send-account-deletion-email](references/send-account-deletion-email.md) - [check-password](references/check-password.md) +- [disconnect-account](references/disconnect-account.md) +- [revoke-api-key](references/revoke-api-key.md) +- [revoke-session](references/revoke-session.md) - [verify-password](references/verify-password.md) - [verify-totp](references/verify-totp.md) - [confirm-delete-account](references/confirm-delete-account.md) - [set-password](references/set-password.md) - [verify-email](references/verify-email.md) +- [provision-new-user](references/provision-new-user.md) - [reset-password](references/reset-password.md) -- [sign-in-one-time-token](references/sign-in-one-time-token.md) -- [sign-in](references/sign-in.md) +- [create-api-key](references/create-api-key.md) +- [sign-in-cross-origin](references/sign-in-cross-origin.md) - [sign-up](references/sign-up.md) -- [one-time-token](references/one-time-token.md) +- [request-cross-origin-token](references/request-cross-origin-token.md) +- [sign-in](references/sign-in.md) - [extend-token-expires](references/extend-token-expires.md) - [forgot-password](references/forgot-password.md) - [send-verification-email](references/send-verification-email.md) diff --git a/.agents/skills/cli-auth/references/create-api-key.md b/.agents/skills/cli-auth/references/create-api-key.md new file mode 100644 index 000000000..7a17ad414 --- /dev/null +++ b/.agents/skills/cli-auth/references/create-api-key.md @@ -0,0 +1,19 @@ +# createApiKey + + + +Execute the createApiKey mutation + +## Usage + +```bash +csdk create-api-key --input.clientMutationId --input.keyName --input.accessLevel --input.mfaLevel +``` + +## Examples + +### Run createApiKey + +```bash +csdk create-api-key --input.clientMutationId --input.keyName --input.accessLevel --input.mfaLevel +``` diff --git a/.agents/skills/cli-auth/references/disconnect-account.md b/.agents/skills/cli-auth/references/disconnect-account.md new file mode 100644 index 000000000..bb3d26cf3 --- /dev/null +++ b/.agents/skills/cli-auth/references/disconnect-account.md @@ -0,0 +1,19 @@ +# disconnectAccount + + + +Execute the disconnectAccount mutation + +## Usage + +```bash +csdk disconnect-account --input.clientMutationId --input.accountId +``` + +## Examples + +### Run disconnectAccount + +```bash +csdk disconnect-account --input.clientMutationId --input.accountId +``` diff --git a/.agents/skills/cli-auth/references/provision-new-user.md b/.agents/skills/cli-auth/references/provision-new-user.md new file mode 100644 index 000000000..57823825e --- /dev/null +++ b/.agents/skills/cli-auth/references/provision-new-user.md @@ -0,0 +1,19 @@ +# provisionNewUser + + + +Execute the provisionNewUser mutation + +## Usage + +```bash +csdk provision-new-user --input.clientMutationId --input.email --input.password +``` + +## Examples + +### Run provisionNewUser + +```bash +csdk provision-new-user --input.clientMutationId --input.email --input.password +``` diff --git a/.agents/skills/cli-auth/references/request-cross-origin-token.md b/.agents/skills/cli-auth/references/request-cross-origin-token.md new file mode 100644 index 000000000..c47e09e84 --- /dev/null +++ b/.agents/skills/cli-auth/references/request-cross-origin-token.md @@ -0,0 +1,19 @@ +# requestCrossOriginToken + + + +Execute the requestCrossOriginToken mutation + +## Usage + +```bash +csdk request-cross-origin-token --input.clientMutationId --input.email --input.password --input.origin --input.rememberMe +``` + +## Examples + +### Run requestCrossOriginToken + +```bash +csdk request-cross-origin-token --input.clientMutationId --input.email --input.password --input.origin --input.rememberMe +``` diff --git a/.agents/skills/cli-auth/references/require-step-up.md b/.agents/skills/cli-auth/references/require-step-up.md new file mode 100644 index 000000000..8d813647b --- /dev/null +++ b/.agents/skills/cli-auth/references/require-step-up.md @@ -0,0 +1,19 @@ +# requireStepUp + + + +Execute the requireStepUp query + +## Usage + +```bash +csdk require-step-up --stepUpType +``` + +## Examples + +### Run requireStepUp + +```bash +csdk require-step-up --stepUpType +``` diff --git a/.agents/skills/cli-auth/references/revoke-api-key.md b/.agents/skills/cli-auth/references/revoke-api-key.md new file mode 100644 index 000000000..c97c101b0 --- /dev/null +++ b/.agents/skills/cli-auth/references/revoke-api-key.md @@ -0,0 +1,19 @@ +# revokeApiKey + + + +Execute the revokeApiKey mutation + +## Usage + +```bash +csdk revoke-api-key --input.clientMutationId --input.keyId +``` + +## Examples + +### Run revokeApiKey + +```bash +csdk revoke-api-key --input.clientMutationId --input.keyId +``` diff --git a/.agents/skills/cli-auth/references/revoke-session.md b/.agents/skills/cli-auth/references/revoke-session.md new file mode 100644 index 000000000..0829261e0 --- /dev/null +++ b/.agents/skills/cli-auth/references/revoke-session.md @@ -0,0 +1,19 @@ +# revokeSession + + + +Execute the revokeSession mutation + +## Usage + +```bash +csdk revoke-session --input.clientMutationId --input.sessionId +``` + +## Examples + +### Run revokeSession + +```bash +csdk revoke-session --input.clientMutationId --input.sessionId +``` diff --git a/.agents/skills/cli-auth/references/sign-in-cross-origin.md b/.agents/skills/cli-auth/references/sign-in-cross-origin.md new file mode 100644 index 000000000..a1b7a0b94 --- /dev/null +++ b/.agents/skills/cli-auth/references/sign-in-cross-origin.md @@ -0,0 +1,19 @@ +# signInCrossOrigin + + + +Execute the signInCrossOrigin mutation + +## Usage + +```bash +csdk sign-in-cross-origin --input.clientMutationId --input.token --input.credentialKind +``` + +## Examples + +### Run signInCrossOrigin + +```bash +csdk sign-in-cross-origin --input.clientMutationId --input.token --input.credentialKind +``` diff --git a/.agents/skills/cli-auth/references/sign-in.md b/.agents/skills/cli-auth/references/sign-in.md index 45db96f62..bdcc79e94 100644 --- a/.agents/skills/cli-auth/references/sign-in.md +++ b/.agents/skills/cli-auth/references/sign-in.md @@ -7,7 +7,7 @@ Execute the signIn mutation ## Usage ```bash -csdk sign-in --input.clientMutationId --input.email --input.password --input.rememberMe --input.credentialKind --input.csrfToken +csdk sign-in --input.clientMutationId --input.email --input.password --input.rememberMe --input.credentialKind --input.csrfToken --input.deviceToken ``` ## Examples @@ -15,5 +15,5 @@ csdk sign-in --input.clientMutationId --input.email --input.pa ### Run signIn ```bash -csdk sign-in --input.clientMutationId --input.email --input.password --input.rememberMe --input.credentialKind --input.csrfToken +csdk sign-in --input.clientMutationId --input.email --input.password --input.rememberMe --input.credentialKind --input.csrfToken --input.deviceToken ``` diff --git a/.agents/skills/cli-auth/references/user-connected-account.md b/.agents/skills/cli-auth/references/user-connected-account.md new file mode 100644 index 000000000..0bf8ecc2c --- /dev/null +++ b/.agents/skills/cli-auth/references/user-connected-account.md @@ -0,0 +1,68 @@ +# userConnectedAccount + + + +CRUD operations for UserConnectedAccount records via csdk CLI + +## Usage + +```bash +csdk user-connected-account list +csdk user-connected-account list --where.. --orderBy +csdk user-connected-account list --limit 10 --after +csdk user-connected-account find-first --where.. +csdk user-connected-account get --id +csdk user-connected-account create [--ownerId ] [--service ] [--identifier ] [--details ] [--isVerified ] +csdk user-connected-account update --id [--ownerId ] [--service ] [--identifier ] [--details ] [--isVerified ] +csdk user-connected-account delete --id +``` + +## Examples + +### List userConnectedAccount records + +```bash +csdk user-connected-account list +``` + +### List userConnectedAccount records with pagination + +```bash +csdk user-connected-account list --limit 10 --offset 0 +``` + +### List userConnectedAccount records with cursor pagination + +```bash +csdk user-connected-account list --limit 10 --after +``` + +### Find first matching userConnectedAccount + +```bash +csdk user-connected-account find-first --where.id.equalTo +``` + +### List userConnectedAccount records with field selection + +```bash +csdk user-connected-account list --select id,id +``` + +### List userConnectedAccount records with filtering and ordering + +```bash +csdk user-connected-account list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a userConnectedAccount + +```bash +csdk user-connected-account create [--ownerId ] [--service ] [--identifier ] [--details ] [--isVerified ] +``` + +### Get a userConnectedAccount by id + +```bash +csdk user-connected-account get --id +``` diff --git a/.agents/skills/cli-public/SKILL.md b/.agents/skills/cli-public/SKILL.md index 4fb3d06fb..8ca6b6055 100644 --- a/.agents/skills/cli-public/SKILL.md +++ b/.agents/skills/cli-public/SKILL.md @@ -1,13 +1,13 @@ --- name: cli-public -description: CLI tool (csdk) for the public API — provides CRUD commands for 109 tables and 64 custom operations +description: CLI tool (csdk) for the public API — provides CRUD commands for 114 tables and 72 custom operations --- # cli-public -CLI tool (csdk) for the public API — provides CRUD commands for 109 tables and 64 custom operations +CLI tool (csdk) for the public API — provides CRUD commands for 114 tables and 72 custom operations ## Usage @@ -68,6 +68,7 @@ See the `references/` directory for detailed per-entity API documentation: - [table](references/table.md) - [check-constraint](references/check-constraint.md) - [field](references/field.md) +- [spatial-relation](references/spatial-relation.md) - [foreign-key-constraint](references/foreign-key-constraint.md) - [full-text-search](references/full-text-search.md) - [index](references/index.md) @@ -81,9 +82,9 @@ See the `references/` directory for detailed per-entity API documentation: - [view-grant](references/view-grant.md) - [view-rule](references/view-rule.md) - [embedding-chunk](references/embedding-chunk.md) -- [table-template-module](references/table-template-module.md) - [secure-table-provision](references/secure-table-provision.md) - [relation-provision](references/relation-provision.md) +- [session-secrets-module](references/session-secrets-module.md) - [schema-grant](references/schema-grant.md) - [default-privilege](references/default-privilege.md) - [enum](references/enum.md) @@ -121,6 +122,8 @@ See the `references/` directory for detailed per-entity API documentation: - [blueprint-template](references/blueprint-template.md) - [blueprint-construction](references/blueprint-construction.md) - [storage-module](references/storage-module.md) +- [entity-type-provision](references/entity-type-provision.md) +- [webauthn-credentials-module](references/webauthn-credentials-module.md) - [database-provision-module](references/database-provision-module.md) - [app-admin-grant](references/app-admin-grant.md) - [app-owner-grant](references/app-owner-grant.md) @@ -129,6 +132,7 @@ See the `references/` directory for detailed per-entity API documentation: - [org-member](references/org-member.md) - [org-admin-grant](references/org-admin-grant.md) - [org-owner-grant](references/org-owner-grant.md) +- [org-member-profile](references/org-member-profile.md) - [org-grant](references/org-grant.md) - [org-chart-edge](references/org-chart-edge.md) - [org-chart-edge-grant](references/org-chart-edge-grant.md) @@ -141,7 +145,6 @@ See the `references/` directory for detailed per-entity API documentation: - [email](references/email.md) - [phone-number](references/phone-number.md) - [crypto-address](references/crypto-address.md) -- [connected-account](references/connected-account.md) - [app-invite](references/app-invite.md) - [app-claimed-invite](references/app-claimed-invite.md) - [org-invite](references/org-invite.md) @@ -154,10 +157,12 @@ See the `references/` directory for detailed per-entity API documentation: - [migrate-file](references/migrate-file.md) - [app-limit-default](references/app-limit-default.md) - [org-limit-default](references/org-limit-default.md) -- [membership-type](references/membership-type.md) +- [devices-module](references/devices-module.md) +- [user-connected-account](references/user-connected-account.md) - [app-membership-default](references/app-membership-default.md) - [commit](references/commit.md) - [rate-limits-module](references/rate-limits-module.md) +- [membership-type](references/membership-type.md) - [org-membership-default](references/org-membership-default.md) - [rls-module](references/rls-module.md) - [sql-action](references/sql-action.md) @@ -166,12 +171,14 @@ See the `references/` directory for detailed per-entity API documentation: - [app-membership](references/app-membership.md) - [hierarchy-module](references/hierarchy-module.md) - [current-user-id](references/current-user-id.md) -- [current-ip-address](references/current-ip-address.md) - [current-user-agent](references/current-user-agent.md) +- [current-ip-address](references/current-ip-address.md) +- [require-step-up](references/require-step-up.md) - [app-permissions-get-padded-mask](references/app-permissions-get-padded-mask.md) - [org-permissions-get-padded-mask](references/org-permissions-get-padded-mask.md) - [steps-achieved](references/steps-achieved.md) - [rev-parse](references/rev-parse.md) +- [resolve-blueprint-field](references/resolve-blueprint-field.md) - [org-is-manager-of](references/org-is-manager-of.md) - [app-permissions-get-mask](references/app-permissions-get-mask.md) - [org-permissions-get-mask](references/org-permissions-get-mask.md) @@ -190,6 +197,9 @@ See the `references/` directory for detailed per-entity API documentation: - [accept-database-transfer](references/accept-database-transfer.md) - [cancel-database-transfer](references/cancel-database-transfer.md) - [reject-database-transfer](references/reject-database-transfer.md) +- [disconnect-account](references/disconnect-account.md) +- [revoke-api-key](references/revoke-api-key.md) +- [revoke-session](references/revoke-session.md) - [verify-password](references/verify-password.md) - [verify-totp](references/verify-totp.md) - [submit-app-invite-code](references/submit-app-invite-code.md) @@ -201,9 +211,12 @@ See the `references/` directory for detailed per-entity API documentation: - [freeze-objects](references/freeze-objects.md) - [init-empty-repo](references/init-empty-repo.md) - [construct-blueprint](references/construct-blueprint.md) +- [provision-new-user](references/provision-new-user.md) - [reset-password](references/reset-password.md) - [remove-node-at-path](references/remove-node-at-path.md) - [copy-template-to-blueprint](references/copy-template-to-blueprint.md) +- [create-api-key](references/create-api-key.md) +- [provision-spatial-relation](references/provision-spatial-relation.md) - [bootstrap-user](references/bootstrap-user.md) - [set-field-order](references/set-field-order.md) - [provision-unique-constraint](references/provision-unique-constraint.md) @@ -217,12 +230,12 @@ See the `references/` directory for detailed per-entity API documentation: - [set-and-commit](references/set-and-commit.md) - [provision-relation](references/provision-relation.md) - [apply-rls](references/apply-rls.md) -- [sign-in-one-time-token](references/sign-in-one-time-token.md) +- [sign-in-cross-origin](references/sign-in-cross-origin.md) - [create-user-database](references/create-user-database.md) - [extend-token-expires](references/extend-token-expires.md) -- [sign-in](references/sign-in.md) - [sign-up](references/sign-up.md) -- [one-time-token](references/one-time-token.md) +- [request-cross-origin-token](references/request-cross-origin-token.md) +- [sign-in](references/sign-in.md) - [provision-table](references/provision-table.md) - [send-verification-email](references/send-verification-email.md) - [forgot-password](references/forgot-password.md) diff --git a/.agents/skills/cli-public/references/app-membership.md b/.agents/skills/cli-public/references/app-membership.md index c58e06de7..8c668a4b5 100644 --- a/.agents/skills/cli-public/references/app-membership.md +++ b/.agents/skills/cli-public/references/app-membership.md @@ -12,8 +12,8 @@ csdk app-membership list --where.. --orderBy csdk app-membership list --limit 10 --after csdk app-membership find-first --where.. csdk app-membership get --id -csdk app-membership create --actorId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] -csdk app-membership update --id [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--actorId ] [--profileId ] +csdk app-membership create --actorId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] +csdk app-membership update --id [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--actorId ] [--profileId ] csdk app-membership delete --id ``` @@ -58,7 +58,7 @@ csdk app-membership list --where.id.equalTo --orderBy ID_ASC ### Create a appMembership ```bash -csdk app-membership create --actorId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] +csdk app-membership create --actorId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isVerified ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] ``` ### Get a appMembership by id diff --git a/.agents/skills/cli-public/references/construct-blueprint.md b/.agents/skills/cli-public/references/construct-blueprint.md index b7ccad570..a0b3bca3b 100644 --- a/.agents/skills/cli-public/references/construct-blueprint.md +++ b/.agents/skills/cli-public/references/construct-blueprint.md @@ -2,7 +2,7 @@ -Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. +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 diff --git a/.agents/skills/cli-public/references/create-api-key.md b/.agents/skills/cli-public/references/create-api-key.md new file mode 100644 index 000000000..7a17ad414 --- /dev/null +++ b/.agents/skills/cli-public/references/create-api-key.md @@ -0,0 +1,19 @@ +# createApiKey + + + +Execute the createApiKey mutation + +## Usage + +```bash +csdk create-api-key --input.clientMutationId --input.keyName --input.accessLevel --input.mfaLevel +``` + +## Examples + +### Run createApiKey + +```bash +csdk create-api-key --input.clientMutationId --input.keyName --input.accessLevel --input.mfaLevel +``` diff --git a/.agents/skills/cli-public/references/devices-module.md b/.agents/skills/cli-public/references/devices-module.md new file mode 100644 index 000000000..9054cca04 --- /dev/null +++ b/.agents/skills/cli-public/references/devices-module.md @@ -0,0 +1,68 @@ +# devicesModule + + + +CRUD operations for DevicesModule records via csdk CLI + +## Usage + +```bash +csdk devices-module list +csdk devices-module list --where.. --orderBy +csdk devices-module list --limit 10 --after +csdk devices-module find-first --where.. +csdk devices-module get --id +csdk devices-module create --databaseId [--schemaId ] [--userDevicesTableId ] [--deviceSettingsTableId ] [--userDevicesTable ] [--deviceSettingsTable ] +csdk devices-module update --id [--databaseId ] [--schemaId ] [--userDevicesTableId ] [--deviceSettingsTableId ] [--userDevicesTable ] [--deviceSettingsTable ] +csdk devices-module delete --id +``` + +## Examples + +### List devicesModule records + +```bash +csdk devices-module list +``` + +### List devicesModule records with pagination + +```bash +csdk devices-module list --limit 10 --offset 0 +``` + +### List devicesModule records with cursor pagination + +```bash +csdk devices-module list --limit 10 --after +``` + +### Find first matching devicesModule + +```bash +csdk devices-module find-first --where.id.equalTo +``` + +### List devicesModule records with field selection + +```bash +csdk devices-module list --select id,id +``` + +### List devicesModule records with filtering and ordering + +```bash +csdk devices-module list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a devicesModule + +```bash +csdk devices-module create --databaseId [--schemaId ] [--userDevicesTableId ] [--deviceSettingsTableId ] [--userDevicesTable ] [--deviceSettingsTable ] +``` + +### Get a devicesModule by id + +```bash +csdk devices-module get --id +``` diff --git a/.agents/skills/cli-public/references/disconnect-account.md b/.agents/skills/cli-public/references/disconnect-account.md new file mode 100644 index 000000000..bb3d26cf3 --- /dev/null +++ b/.agents/skills/cli-public/references/disconnect-account.md @@ -0,0 +1,19 @@ +# disconnectAccount + + + +Execute the disconnectAccount mutation + +## Usage + +```bash +csdk disconnect-account --input.clientMutationId --input.accountId +``` + +## Examples + +### Run disconnectAccount + +```bash +csdk disconnect-account --input.clientMutationId --input.accountId +``` diff --git a/.agents/skills/cli-public/references/entity-type-provision.md b/.agents/skills/cli-public/references/entity-type-provision.md new file mode 100644 index 000000000..a5d7c6fbd --- /dev/null +++ b/.agents/skills/cli-public/references/entity-type-provision.md @@ -0,0 +1,68 @@ +# entityTypeProvision + + + +CRUD operations for EntityTypeProvision records via csdk CLI + +## Usage + +```bash +csdk entity-type-provision list +csdk entity-type-provision list --where.. --orderBy +csdk entity-type-provision list --limit 10 --after +csdk entity-type-provision find-first --where.. +csdk entity-type-provision get --id +csdk entity-type-provision create --databaseId --name --prefix [--description ] [--parentEntity ] [--tableName ] [--isVisible ] [--hasLimits ] [--hasProfiles ] [--hasLevels ] [--skipEntityPolicies ] [--tableProvision ] [--outMembershipType ] [--outEntityTableId ] [--outEntityTableName ] [--outInstalledModules ] +csdk entity-type-provision update --id [--databaseId ] [--name ] [--prefix ] [--description ] [--parentEntity ] [--tableName ] [--isVisible ] [--hasLimits ] [--hasProfiles ] [--hasLevels ] [--skipEntityPolicies ] [--tableProvision ] [--outMembershipType ] [--outEntityTableId ] [--outEntityTableName ] [--outInstalledModules ] +csdk entity-type-provision delete --id +``` + +## Examples + +### List entityTypeProvision records + +```bash +csdk entity-type-provision list +``` + +### List entityTypeProvision records with pagination + +```bash +csdk entity-type-provision list --limit 10 --offset 0 +``` + +### List entityTypeProvision records with cursor pagination + +```bash +csdk entity-type-provision list --limit 10 --after +``` + +### Find first matching entityTypeProvision + +```bash +csdk entity-type-provision find-first --where.id.equalTo +``` + +### List entityTypeProvision records with field selection + +```bash +csdk entity-type-provision list --select id,id +``` + +### List entityTypeProvision records with filtering and ordering + +```bash +csdk entity-type-provision list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a entityTypeProvision + +```bash +csdk entity-type-provision create --databaseId --name --prefix [--description ] [--parentEntity ] [--tableName ] [--isVisible ] [--hasLimits ] [--hasProfiles ] [--hasLevels ] [--skipEntityPolicies ] [--tableProvision ] [--outMembershipType ] [--outEntityTableId ] [--outEntityTableName ] [--outInstalledModules ] +``` + +### Get a entityTypeProvision by id + +```bash +csdk entity-type-provision get --id +``` diff --git a/.agents/skills/cli-public/references/membership-type.md b/.agents/skills/cli-public/references/membership-type.md index 657508364..8b1f3189f 100644 --- a/.agents/skills/cli-public/references/membership-type.md +++ b/.agents/skills/cli-public/references/membership-type.md @@ -12,8 +12,8 @@ csdk membership-type list --where.. --orderBy csdk membership-type list --limit 10 --after csdk membership-type find-first --where.. csdk membership-type get --id -csdk membership-type create --name --description --prefix -csdk membership-type update --id [--name ] [--description ] [--prefix ] +csdk membership-type create --name --description --prefix [--parentMembershipType ] [--hasUsersTableEntry ] +csdk membership-type update --id [--name ] [--description ] [--prefix ] [--parentMembershipType ] [--hasUsersTableEntry ] csdk membership-type delete --id ``` @@ -58,7 +58,7 @@ csdk membership-type list --where.id.equalTo --orderBy ID_ASC ### Create a membershipType ```bash -csdk membership-type create --name --description --prefix +csdk membership-type create --name --description --prefix [--parentMembershipType ] [--hasUsersTableEntry ] ``` ### Get a membershipType by id diff --git a/.agents/skills/cli-public/references/memberships-module.md b/.agents/skills/cli-public/references/memberships-module.md index cbbe91dfc..19b19b266 100644 --- a/.agents/skills/cli-public/references/memberships-module.md +++ b/.agents/skills/cli-public/references/memberships-module.md @@ -12,8 +12,8 @@ csdk memberships-module list --where.. --orderBy csdk memberships-module list --limit 10 --after csdk memberships-module find-first --where.. csdk memberships-module get --id -csdk memberships-module create --databaseId --membershipType [--schemaId ] [--privateSchemaId ] [--membershipsTableId ] [--membershipsTableName ] [--membersTableId ] [--membersTableName ] [--membershipDefaultsTableId ] [--membershipDefaultsTableName ] [--grantsTableId ] [--grantsTableName ] [--actorTableId ] [--limitsTableId ] [--defaultLimitsTableId ] [--permissionsTableId ] [--defaultPermissionsTableId ] [--sprtTableId ] [--adminGrantsTableId ] [--adminGrantsTableName ] [--ownerGrantsTableId ] [--ownerGrantsTableName ] [--entityTableId ] [--entityTableOwnerId ] [--prefix ] [--actorMaskCheck ] [--actorPermCheck ] [--entityIdsByMask ] [--entityIdsByPerm ] [--entityIdsFunction ] -csdk memberships-module update --id [--databaseId ] [--schemaId ] [--privateSchemaId ] [--membershipsTableId ] [--membershipsTableName ] [--membersTableId ] [--membersTableName ] [--membershipDefaultsTableId ] [--membershipDefaultsTableName ] [--grantsTableId ] [--grantsTableName ] [--actorTableId ] [--limitsTableId ] [--defaultLimitsTableId ] [--permissionsTableId ] [--defaultPermissionsTableId ] [--sprtTableId ] [--adminGrantsTableId ] [--adminGrantsTableName ] [--ownerGrantsTableId ] [--ownerGrantsTableName ] [--membershipType ] [--entityTableId ] [--entityTableOwnerId ] [--prefix ] [--actorMaskCheck ] [--actorPermCheck ] [--entityIdsByMask ] [--entityIdsByPerm ] [--entityIdsFunction ] +csdk memberships-module create --databaseId --membershipType [--schemaId ] [--privateSchemaId ] [--membershipsTableId ] [--membershipsTableName ] [--membersTableId ] [--membersTableName ] [--membershipDefaultsTableId ] [--membershipDefaultsTableName ] [--grantsTableId ] [--grantsTableName ] [--actorTableId ] [--limitsTableId ] [--defaultLimitsTableId ] [--permissionsTableId ] [--defaultPermissionsTableId ] [--sprtTableId ] [--adminGrantsTableId ] [--adminGrantsTableName ] [--ownerGrantsTableId ] [--ownerGrantsTableName ] [--entityTableId ] [--entityTableOwnerId ] [--prefix ] [--actorMaskCheck ] [--actorPermCheck ] [--entityIdsByMask ] [--entityIdsByPerm ] [--entityIdsFunction ] [--memberProfilesTableId ] +csdk memberships-module update --id [--databaseId ] [--schemaId ] [--privateSchemaId ] [--membershipsTableId ] [--membershipsTableName ] [--membersTableId ] [--membersTableName ] [--membershipDefaultsTableId ] [--membershipDefaultsTableName ] [--grantsTableId ] [--grantsTableName ] [--actorTableId ] [--limitsTableId ] [--defaultLimitsTableId ] [--permissionsTableId ] [--defaultPermissionsTableId ] [--sprtTableId ] [--adminGrantsTableId ] [--adminGrantsTableName ] [--ownerGrantsTableId ] [--ownerGrantsTableName ] [--membershipType ] [--entityTableId ] [--entityTableOwnerId ] [--prefix ] [--actorMaskCheck ] [--actorPermCheck ] [--entityIdsByMask ] [--entityIdsByPerm ] [--entityIdsFunction ] [--memberProfilesTableId ] csdk memberships-module delete --id ``` @@ -58,7 +58,7 @@ csdk memberships-module list --where.id.equalTo --orderBy ID_ASC ### Create a membershipsModule ```bash -csdk memberships-module create --databaseId --membershipType [--schemaId ] [--privateSchemaId ] [--membershipsTableId ] [--membershipsTableName ] [--membersTableId ] [--membersTableName ] [--membershipDefaultsTableId ] [--membershipDefaultsTableName ] [--grantsTableId ] [--grantsTableName ] [--actorTableId ] [--limitsTableId ] [--defaultLimitsTableId ] [--permissionsTableId ] [--defaultPermissionsTableId ] [--sprtTableId ] [--adminGrantsTableId ] [--adminGrantsTableName ] [--ownerGrantsTableId ] [--ownerGrantsTableName ] [--entityTableId ] [--entityTableOwnerId ] [--prefix ] [--actorMaskCheck ] [--actorPermCheck ] [--entityIdsByMask ] [--entityIdsByPerm ] [--entityIdsFunction ] +csdk memberships-module create --databaseId --membershipType [--schemaId ] [--privateSchemaId ] [--membershipsTableId ] [--membershipsTableName ] [--membersTableId ] [--membersTableName ] [--membershipDefaultsTableId ] [--membershipDefaultsTableName ] [--grantsTableId ] [--grantsTableName ] [--actorTableId ] [--limitsTableId ] [--defaultLimitsTableId ] [--permissionsTableId ] [--defaultPermissionsTableId ] [--sprtTableId ] [--adminGrantsTableId ] [--adminGrantsTableName ] [--ownerGrantsTableId ] [--ownerGrantsTableName ] [--entityTableId ] [--entityTableOwnerId ] [--prefix ] [--actorMaskCheck ] [--actorPermCheck ] [--entityIdsByMask ] [--entityIdsByPerm ] [--entityIdsFunction ] [--memberProfilesTableId ] ``` ### Get a membershipsModule by id diff --git a/.agents/skills/cli-public/references/org-member-profile.md b/.agents/skills/cli-public/references/org-member-profile.md new file mode 100644 index 000000000..52b2cf8e2 --- /dev/null +++ b/.agents/skills/cli-public/references/org-member-profile.md @@ -0,0 +1,68 @@ +# orgMemberProfile + + + +CRUD operations for OrgMemberProfile records via csdk CLI + +## Usage + +```bash +csdk org-member-profile list +csdk org-member-profile list --where.. --orderBy +csdk org-member-profile list --limit 10 --after +csdk org-member-profile find-first --where.. +csdk org-member-profile get --id +csdk org-member-profile create --membershipId --entityId --actorId [--displayName ] [--email ] [--title ] [--bio ] [--profilePicture ] +csdk org-member-profile update --id [--membershipId ] [--entityId ] [--actorId ] [--displayName ] [--email ] [--title ] [--bio ] [--profilePicture ] +csdk org-member-profile delete --id +``` + +## Examples + +### List orgMemberProfile records + +```bash +csdk org-member-profile list +``` + +### List orgMemberProfile records with pagination + +```bash +csdk org-member-profile list --limit 10 --offset 0 +``` + +### List orgMemberProfile records with cursor pagination + +```bash +csdk org-member-profile list --limit 10 --after +``` + +### Find first matching orgMemberProfile + +```bash +csdk org-member-profile find-first --where.id.equalTo +``` + +### List orgMemberProfile records with field selection + +```bash +csdk org-member-profile list --select id,id +``` + +### List orgMemberProfile records with filtering and ordering + +```bash +csdk org-member-profile list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a orgMemberProfile + +```bash +csdk org-member-profile create --membershipId --entityId --actorId [--displayName ] [--email ] [--title ] [--bio ] [--profilePicture ] +``` + +### Get a orgMemberProfile by id + +```bash +csdk org-member-profile get --id +``` diff --git a/.agents/skills/cli-public/references/org-membership.md b/.agents/skills/cli-public/references/org-membership.md index f8ea35463..9be13b129 100644 --- a/.agents/skills/cli-public/references/org-membership.md +++ b/.agents/skills/cli-public/references/org-membership.md @@ -12,8 +12,8 @@ csdk org-membership list --where.. --orderBy csdk org-membership list --limit 10 --after csdk org-membership find-first --where.. csdk org-membership get --id -csdk org-membership create --actorId --entityId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] -csdk org-membership update --id [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--actorId ] [--entityId ] [--profileId ] +csdk org-membership create --actorId --entityId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--isReadOnly ] [--profileId ] +csdk org-membership update --id [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--actorId ] [--entityId ] [--isReadOnly ] [--profileId ] csdk org-membership delete --id ``` @@ -58,7 +58,7 @@ csdk org-membership list --where.id.equalTo --orderBy ID_ASC ### Create a orgMembership ```bash -csdk org-membership create --actorId --entityId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--profileId ] +csdk org-membership create --actorId --entityId [--createdBy ] [--updatedBy ] [--isApproved ] [--isBanned ] [--isDisabled ] [--isActive ] [--isExternal ] [--isOwner ] [--isAdmin ] [--permissions ] [--granted ] [--isReadOnly ] [--profileId ] ``` ### Get a orgMembership by id diff --git a/.agents/skills/cli-public/references/provision-new-user.md b/.agents/skills/cli-public/references/provision-new-user.md new file mode 100644 index 000000000..57823825e --- /dev/null +++ b/.agents/skills/cli-public/references/provision-new-user.md @@ -0,0 +1,19 @@ +# provisionNewUser + + + +Execute the provisionNewUser mutation + +## Usage + +```bash +csdk provision-new-user --input.clientMutationId --input.email --input.password +``` + +## Examples + +### Run provisionNewUser + +```bash +csdk provision-new-user --input.clientMutationId --input.email --input.password +``` diff --git a/.agents/skills/cli-public/references/provision-spatial-relation.md b/.agents/skills/cli-public/references/provision-spatial-relation.md new file mode 100644 index 000000000..0b5b89614 --- /dev/null +++ b/.agents/skills/cli-public/references/provision-spatial-relation.md @@ -0,0 +1,19 @@ +# provisionSpatialRelation + + + +Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + +## Usage + +```bash +csdk provision-spatial-relation --input.clientMutationId --input.pDatabaseId --input.pSourceTableId --input.pSourceFieldId --input.pTargetTableId --input.pTargetFieldId --input.pName --input.pOperator --input.pParamName +``` + +## Examples + +### Run provisionSpatialRelation + +```bash +csdk provision-spatial-relation --input.clientMutationId --input.pDatabaseId --input.pSourceTableId --input.pSourceFieldId --input.pTargetTableId --input.pTargetFieldId --input.pName --input.pOperator --input.pParamName +``` diff --git a/.agents/skills/cli-public/references/request-cross-origin-token.md b/.agents/skills/cli-public/references/request-cross-origin-token.md new file mode 100644 index 000000000..c47e09e84 --- /dev/null +++ b/.agents/skills/cli-public/references/request-cross-origin-token.md @@ -0,0 +1,19 @@ +# requestCrossOriginToken + + + +Execute the requestCrossOriginToken mutation + +## Usage + +```bash +csdk request-cross-origin-token --input.clientMutationId --input.email --input.password --input.origin --input.rememberMe +``` + +## Examples + +### Run requestCrossOriginToken + +```bash +csdk request-cross-origin-token --input.clientMutationId --input.email --input.password --input.origin --input.rememberMe +``` diff --git a/.agents/skills/cli-public/references/require-step-up.md b/.agents/skills/cli-public/references/require-step-up.md new file mode 100644 index 000000000..8d813647b --- /dev/null +++ b/.agents/skills/cli-public/references/require-step-up.md @@ -0,0 +1,19 @@ +# requireStepUp + + + +Execute the requireStepUp query + +## Usage + +```bash +csdk require-step-up --stepUpType +``` + +## Examples + +### Run requireStepUp + +```bash +csdk require-step-up --stepUpType +``` diff --git a/.agents/skills/cli-public/references/resolve-blueprint-field.md b/.agents/skills/cli-public/references/resolve-blueprint-field.md new file mode 100644 index 000000000..4aac79d78 --- /dev/null +++ b/.agents/skills/cli-public/references/resolve-blueprint-field.md @@ -0,0 +1,19 @@ +# resolveBlueprintField + + + +Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + +## Usage + +```bash +csdk resolve-blueprint-field --databaseId --tableId --fieldName +``` + +## Examples + +### Run resolveBlueprintField + +```bash +csdk resolve-blueprint-field --databaseId --tableId --fieldName +``` diff --git a/.agents/skills/cli-public/references/revoke-api-key.md b/.agents/skills/cli-public/references/revoke-api-key.md new file mode 100644 index 000000000..c97c101b0 --- /dev/null +++ b/.agents/skills/cli-public/references/revoke-api-key.md @@ -0,0 +1,19 @@ +# revokeApiKey + + + +Execute the revokeApiKey mutation + +## Usage + +```bash +csdk revoke-api-key --input.clientMutationId --input.keyId +``` + +## Examples + +### Run revokeApiKey + +```bash +csdk revoke-api-key --input.clientMutationId --input.keyId +``` diff --git a/.agents/skills/cli-public/references/revoke-session.md b/.agents/skills/cli-public/references/revoke-session.md new file mode 100644 index 000000000..0829261e0 --- /dev/null +++ b/.agents/skills/cli-public/references/revoke-session.md @@ -0,0 +1,19 @@ +# revokeSession + + + +Execute the revokeSession mutation + +## Usage + +```bash +csdk revoke-session --input.clientMutationId --input.sessionId +``` + +## Examples + +### Run revokeSession + +```bash +csdk revoke-session --input.clientMutationId --input.sessionId +``` diff --git a/.agents/skills/cli-public/references/session-secrets-module.md b/.agents/skills/cli-public/references/session-secrets-module.md new file mode 100644 index 000000000..e02671d1a --- /dev/null +++ b/.agents/skills/cli-public/references/session-secrets-module.md @@ -0,0 +1,68 @@ +# sessionSecretsModule + + + +CRUD operations for SessionSecretsModule records via csdk CLI + +## Usage + +```bash +csdk session-secrets-module list +csdk session-secrets-module list --where.. --orderBy +csdk session-secrets-module list --limit 10 --after +csdk session-secrets-module find-first --where.. +csdk session-secrets-module get --id +csdk session-secrets-module create --databaseId [--schemaId ] [--tableId ] [--tableName ] [--sessionsTableId ] +csdk session-secrets-module update --id [--databaseId ] [--schemaId ] [--tableId ] [--tableName ] [--sessionsTableId ] +csdk session-secrets-module delete --id +``` + +## Examples + +### List sessionSecretsModule records + +```bash +csdk session-secrets-module list +``` + +### List sessionSecretsModule records with pagination + +```bash +csdk session-secrets-module list --limit 10 --offset 0 +``` + +### List sessionSecretsModule records with cursor pagination + +```bash +csdk session-secrets-module list --limit 10 --after +``` + +### Find first matching sessionSecretsModule + +```bash +csdk session-secrets-module find-first --where.id.equalTo +``` + +### List sessionSecretsModule records with field selection + +```bash +csdk session-secrets-module list --select id,id +``` + +### List sessionSecretsModule records with filtering and ordering + +```bash +csdk session-secrets-module list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a sessionSecretsModule + +```bash +csdk session-secrets-module create --databaseId [--schemaId ] [--tableId ] [--tableName ] [--sessionsTableId ] +``` + +### Get a sessionSecretsModule by id + +```bash +csdk session-secrets-module get --id +``` diff --git a/.agents/skills/cli-public/references/sign-in-cross-origin.md b/.agents/skills/cli-public/references/sign-in-cross-origin.md new file mode 100644 index 000000000..a1b7a0b94 --- /dev/null +++ b/.agents/skills/cli-public/references/sign-in-cross-origin.md @@ -0,0 +1,19 @@ +# signInCrossOrigin + + + +Execute the signInCrossOrigin mutation + +## Usage + +```bash +csdk sign-in-cross-origin --input.clientMutationId --input.token --input.credentialKind +``` + +## Examples + +### Run signInCrossOrigin + +```bash +csdk sign-in-cross-origin --input.clientMutationId --input.token --input.credentialKind +``` diff --git a/.agents/skills/cli-public/references/sign-in.md b/.agents/skills/cli-public/references/sign-in.md index 45db96f62..bdcc79e94 100644 --- a/.agents/skills/cli-public/references/sign-in.md +++ b/.agents/skills/cli-public/references/sign-in.md @@ -7,7 +7,7 @@ Execute the signIn mutation ## Usage ```bash -csdk sign-in --input.clientMutationId --input.email --input.password --input.rememberMe --input.credentialKind --input.csrfToken +csdk sign-in --input.clientMutationId --input.email --input.password --input.rememberMe --input.credentialKind --input.csrfToken --input.deviceToken ``` ## Examples @@ -15,5 +15,5 @@ csdk sign-in --input.clientMutationId --input.email --input.pa ### Run signIn ```bash -csdk sign-in --input.clientMutationId --input.email --input.password --input.rememberMe --input.credentialKind --input.csrfToken +csdk sign-in --input.clientMutationId --input.email --input.password --input.rememberMe --input.credentialKind --input.csrfToken --input.deviceToken ``` diff --git a/.agents/skills/cli-public/references/spatial-relation.md b/.agents/skills/cli-public/references/spatial-relation.md new file mode 100644 index 000000000..130d99614 --- /dev/null +++ b/.agents/skills/cli-public/references/spatial-relation.md @@ -0,0 +1,68 @@ +# spatialRelation + + + +CRUD operations for SpatialRelation records via csdk CLI + +## Usage + +```bash +csdk spatial-relation list +csdk spatial-relation list --where.. --orderBy +csdk spatial-relation list --limit 10 --after +csdk spatial-relation find-first --where.. +csdk spatial-relation get --id +csdk spatial-relation create --tableId --fieldId --refTableId --refFieldId --name --operator [--databaseId ] [--paramName ] [--category ] [--module ] [--scope ] [--tags ] +csdk spatial-relation update --id [--databaseId ] [--tableId ] [--fieldId ] [--refTableId ] [--refFieldId ] [--name ] [--operator ] [--paramName ] [--category ] [--module ] [--scope ] [--tags ] +csdk spatial-relation delete --id +``` + +## Examples + +### List spatialRelation records + +```bash +csdk spatial-relation list +``` + +### List spatialRelation records with pagination + +```bash +csdk spatial-relation list --limit 10 --offset 0 +``` + +### List spatialRelation records with cursor pagination + +```bash +csdk spatial-relation list --limit 10 --after +``` + +### Find first matching spatialRelation + +```bash +csdk spatial-relation find-first --where.id.equalTo +``` + +### List spatialRelation records with field selection + +```bash +csdk spatial-relation list --select id,id +``` + +### List spatialRelation records with filtering and ordering + +```bash +csdk spatial-relation list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a spatialRelation + +```bash +csdk spatial-relation create --tableId --fieldId --refTableId --refFieldId --name --operator [--databaseId ] [--paramName ] [--category ] [--module ] [--scope ] [--tags ] +``` + +### Get a spatialRelation by id + +```bash +csdk spatial-relation get --id +``` diff --git a/.agents/skills/cli-public/references/user-auth-module.md b/.agents/skills/cli-public/references/user-auth-module.md index c635256eb..eb8c72dea 100644 --- a/.agents/skills/cli-public/references/user-auth-module.md +++ b/.agents/skills/cli-public/references/user-auth-module.md @@ -12,8 +12,8 @@ csdk user-auth-module list --where.. --orderBy csdk user-auth-module list --limit 10 --after csdk user-auth-module find-first --where.. csdk user-auth-module get --id -csdk user-auth-module create --databaseId [--schemaId ] [--emailsTableId ] [--usersTableId ] [--secretsTableId ] [--encryptedTableId ] [--sessionsTableId ] [--sessionCredentialsTableId ] [--auditsTableId ] [--auditsTableName ] [--signInFunction ] [--signUpFunction ] [--signOutFunction ] [--setPasswordFunction ] [--resetPasswordFunction ] [--forgotPasswordFunction ] [--sendVerificationEmailFunction ] [--verifyEmailFunction ] [--verifyPasswordFunction ] [--checkPasswordFunction ] [--sendAccountDeletionEmailFunction ] [--deleteAccountFunction ] [--signInOneTimeTokenFunction ] [--oneTimeTokenFunction ] [--extendTokenExpires ] -csdk user-auth-module update --id [--databaseId ] [--schemaId ] [--emailsTableId ] [--usersTableId ] [--secretsTableId ] [--encryptedTableId ] [--sessionsTableId ] [--sessionCredentialsTableId ] [--auditsTableId ] [--auditsTableName ] [--signInFunction ] [--signUpFunction ] [--signOutFunction ] [--setPasswordFunction ] [--resetPasswordFunction ] [--forgotPasswordFunction ] [--sendVerificationEmailFunction ] [--verifyEmailFunction ] [--verifyPasswordFunction ] [--checkPasswordFunction ] [--sendAccountDeletionEmailFunction ] [--deleteAccountFunction ] [--signInOneTimeTokenFunction ] [--oneTimeTokenFunction ] [--extendTokenExpires ] +csdk user-auth-module create --databaseId [--schemaId ] [--emailsTableId ] [--usersTableId ] [--secretsTableId ] [--encryptedTableId ] [--sessionsTableId ] [--sessionCredentialsTableId ] [--auditsTableId ] [--auditsTableName ] [--signInFunction ] [--signUpFunction ] [--signOutFunction ] [--setPasswordFunction ] [--resetPasswordFunction ] [--forgotPasswordFunction ] [--sendVerificationEmailFunction ] [--verifyEmailFunction ] [--verifyPasswordFunction ] [--checkPasswordFunction ] [--sendAccountDeletionEmailFunction ] [--deleteAccountFunction ] [--signInCrossOriginFunction ] [--requestCrossOriginTokenFunction ] [--extendTokenExpires ] +csdk user-auth-module update --id [--databaseId ] [--schemaId ] [--emailsTableId ] [--usersTableId ] [--secretsTableId ] [--encryptedTableId ] [--sessionsTableId ] [--sessionCredentialsTableId ] [--auditsTableId ] [--auditsTableName ] [--signInFunction ] [--signUpFunction ] [--signOutFunction ] [--setPasswordFunction ] [--resetPasswordFunction ] [--forgotPasswordFunction ] [--sendVerificationEmailFunction ] [--verifyEmailFunction ] [--verifyPasswordFunction ] [--checkPasswordFunction ] [--sendAccountDeletionEmailFunction ] [--deleteAccountFunction ] [--signInCrossOriginFunction ] [--requestCrossOriginTokenFunction ] [--extendTokenExpires ] csdk user-auth-module delete --id ``` @@ -58,7 +58,7 @@ csdk user-auth-module list --where.id.equalTo --orderBy ID_ASC ### Create a userAuthModule ```bash -csdk user-auth-module create --databaseId [--schemaId ] [--emailsTableId ] [--usersTableId ] [--secretsTableId ] [--encryptedTableId ] [--sessionsTableId ] [--sessionCredentialsTableId ] [--auditsTableId ] [--auditsTableName ] [--signInFunction ] [--signUpFunction ] [--signOutFunction ] [--setPasswordFunction ] [--resetPasswordFunction ] [--forgotPasswordFunction ] [--sendVerificationEmailFunction ] [--verifyEmailFunction ] [--verifyPasswordFunction ] [--checkPasswordFunction ] [--sendAccountDeletionEmailFunction ] [--deleteAccountFunction ] [--signInOneTimeTokenFunction ] [--oneTimeTokenFunction ] [--extendTokenExpires ] +csdk user-auth-module create --databaseId [--schemaId ] [--emailsTableId ] [--usersTableId ] [--secretsTableId ] [--encryptedTableId ] [--sessionsTableId ] [--sessionCredentialsTableId ] [--auditsTableId ] [--auditsTableName ] [--signInFunction ] [--signUpFunction ] [--signOutFunction ] [--setPasswordFunction ] [--resetPasswordFunction ] [--forgotPasswordFunction ] [--sendVerificationEmailFunction ] [--verifyEmailFunction ] [--verifyPasswordFunction ] [--checkPasswordFunction ] [--sendAccountDeletionEmailFunction ] [--deleteAccountFunction ] [--signInCrossOriginFunction ] [--requestCrossOriginTokenFunction ] [--extendTokenExpires ] ``` ### Get a userAuthModule by id diff --git a/.agents/skills/cli-public/references/user-connected-account.md b/.agents/skills/cli-public/references/user-connected-account.md new file mode 100644 index 000000000..0bf8ecc2c --- /dev/null +++ b/.agents/skills/cli-public/references/user-connected-account.md @@ -0,0 +1,68 @@ +# userConnectedAccount + + + +CRUD operations for UserConnectedAccount records via csdk CLI + +## Usage + +```bash +csdk user-connected-account list +csdk user-connected-account list --where.. --orderBy +csdk user-connected-account list --limit 10 --after +csdk user-connected-account find-first --where.. +csdk user-connected-account get --id +csdk user-connected-account create [--ownerId ] [--service ] [--identifier ] [--details ] [--isVerified ] +csdk user-connected-account update --id [--ownerId ] [--service ] [--identifier ] [--details ] [--isVerified ] +csdk user-connected-account delete --id +``` + +## Examples + +### List userConnectedAccount records + +```bash +csdk user-connected-account list +``` + +### List userConnectedAccount records with pagination + +```bash +csdk user-connected-account list --limit 10 --offset 0 +``` + +### List userConnectedAccount records with cursor pagination + +```bash +csdk user-connected-account list --limit 10 --after +``` + +### Find first matching userConnectedAccount + +```bash +csdk user-connected-account find-first --where.id.equalTo +``` + +### List userConnectedAccount records with field selection + +```bash +csdk user-connected-account list --select id,id +``` + +### List userConnectedAccount records with filtering and ordering + +```bash +csdk user-connected-account list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a userConnectedAccount + +```bash +csdk user-connected-account create [--ownerId ] [--service ] [--identifier ] [--details ] [--isVerified ] +``` + +### Get a userConnectedAccount by id + +```bash +csdk user-connected-account get --id +``` diff --git a/.agents/skills/cli-public/references/webauthn-credentials-module.md b/.agents/skills/cli-public/references/webauthn-credentials-module.md new file mode 100644 index 000000000..b976f79ab --- /dev/null +++ b/.agents/skills/cli-public/references/webauthn-credentials-module.md @@ -0,0 +1,68 @@ +# webauthnCredentialsModule + + + +CRUD operations for WebauthnCredentialsModule records via csdk CLI + +## Usage + +```bash +csdk webauthn-credentials-module list +csdk webauthn-credentials-module list --where.. --orderBy +csdk webauthn-credentials-module list --limit 10 --after +csdk webauthn-credentials-module find-first --where.. +csdk webauthn-credentials-module get --id +csdk webauthn-credentials-module create --databaseId [--schemaId ] [--privateSchemaId ] [--tableId ] [--ownerTableId ] [--tableName ] +csdk webauthn-credentials-module update --id [--databaseId ] [--schemaId ] [--privateSchemaId ] [--tableId ] [--ownerTableId ] [--tableName ] +csdk webauthn-credentials-module delete --id +``` + +## Examples + +### List webauthnCredentialsModule records + +```bash +csdk webauthn-credentials-module list +``` + +### List webauthnCredentialsModule records with pagination + +```bash +csdk webauthn-credentials-module list --limit 10 --offset 0 +``` + +### List webauthnCredentialsModule records with cursor pagination + +```bash +csdk webauthn-credentials-module list --limit 10 --after +``` + +### Find first matching webauthnCredentialsModule + +```bash +csdk webauthn-credentials-module find-first --where.id.equalTo +``` + +### List webauthnCredentialsModule records with field selection + +```bash +csdk webauthn-credentials-module list --select id,id +``` + +### List webauthnCredentialsModule records with filtering and ordering + +```bash +csdk webauthn-credentials-module list --where.id.equalTo --orderBy ID_ASC +``` + +### Create a webauthnCredentialsModule + +```bash +csdk webauthn-credentials-module create --databaseId [--schemaId ] [--privateSchemaId ] [--tableId ] [--ownerTableId ] [--tableName ] +``` + +### Get a webauthnCredentialsModule by id + +```bash +csdk webauthn-credentials-module get --id +``` diff --git a/.agents/skills/hooks-admin/SKILL.md b/.agents/skills/hooks-admin/SKILL.md index 99d150876..da6afd79e 100644 --- a/.agents/skills/hooks-admin/SKILL.md +++ b/.agents/skills/hooks-admin/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-admin -description: React Query hooks for the admin API — provides typed query and mutation hooks for 32 tables and 16 custom operations +description: React Query hooks for the admin API — provides typed query and mutation hooks for 33 tables and 16 custom operations --- # hooks-admin -React Query hooks for the admin API — provides typed query and mutation hooks for 32 tables and 16 custom operations +React Query hooks for the admin API — provides typed query and mutation hooks for 33 tables and 16 custom operations ## Usage @@ -51,24 +51,25 @@ See the `references/` directory for detailed per-entity API documentation: - [org-limit-default](references/org-limit-default.md) - [org-admin-grant](references/org-admin-grant.md) - [org-owner-grant](references/org-owner-grant.md) -- [membership-type](references/membership-type.md) - [app-limit](references/app-limit.md) - [app-achievement](references/app-achievement.md) - [app-step](references/app-step.md) - [app-claimed-invite](references/app-claimed-invite.md) - [org-chart-edge-grant](references/org-chart-edge-grant.md) - [org-limit](references/org-limit.md) +- [membership-type](references/membership-type.md) - [app-grant](references/app-grant.md) - [app-membership-default](references/app-membership-default.md) - [org-claimed-invite](references/org-claimed-invite.md) - [org-grant](references/org-grant.md) - [org-chart-edge](references/org-chart-edge.md) - [org-membership-default](references/org-membership-default.md) +- [org-member-profile](references/org-member-profile.md) - [app-level](references/app-level.md) - [app-invite](references/app-invite.md) +- [org-invite](references/org-invite.md) - [app-membership](references/app-membership.md) - [org-membership](references/org-membership.md) -- [org-invite](references/org-invite.md) - [app-permissions-get-padded-mask](references/app-permissions-get-padded-mask.md) - [org-permissions-get-padded-mask](references/org-permissions-get-padded-mask.md) - [org-is-manager-of](references/org-is-manager-of.md) diff --git a/.agents/skills/hooks-admin/references/app-membership.md b/.agents/skills/hooks-admin/references/app-membership.md index b8d352ef8..75b48ac9c 100644 --- a/.agents/skills/hooks-admin/references/app-membership.md +++ b/.agents/skills/hooks-admin/references/app-membership.md @@ -7,8 +7,8 @@ Tracks membership records linking actors to entities with permission bitmasks, o ## Usage ```typescript -useAppMembershipsQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } } }) -useAppMembershipQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } } }) +useAppMembershipsQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } } }) +useAppMembershipQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } } }) useCreateAppMembershipMutation({ selection: { fields: { id: true } } }) useUpdateAppMembershipMutation({ selection: { fields: { id: true } } }) useDeleteAppMembershipMutation({}) @@ -20,7 +20,7 @@ useDeleteAppMembershipMutation({}) ```typescript const { data, isLoading } = useAppMembershipsQuery({ - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useAppMembershipsQuery({ const { mutate } = useCreateAppMembershipMutation({ selection: { fields: { id: true } }, }); -mutate({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }); +mutate({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }); ``` diff --git a/.agents/skills/hooks-admin/references/membership-type.md b/.agents/skills/hooks-admin/references/membership-type.md index 8d627c5cc..6273754ce 100644 --- a/.agents/skills/hooks-admin/references/membership-type.md +++ b/.agents/skills/hooks-admin/references/membership-type.md @@ -7,8 +7,8 @@ Defines the different scopes of membership (e.g. App Member, Organization Member ## Usage ```typescript -useMembershipTypesQuery({ selection: { fields: { id: true, name: true, description: true, prefix: true } } }) -useMembershipTypeQuery({ id: '', selection: { fields: { id: true, name: true, description: true, prefix: true } } }) +useMembershipTypesQuery({ selection: { fields: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } } }) +useMembershipTypeQuery({ id: '', selection: { fields: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } } }) useCreateMembershipTypeMutation({ selection: { fields: { id: true } } }) useUpdateMembershipTypeMutation({ selection: { fields: { id: true } } }) useDeleteMembershipTypeMutation({}) @@ -20,7 +20,7 @@ useDeleteMembershipTypeMutation({}) ```typescript const { data, isLoading } = useMembershipTypesQuery({ - selection: { fields: { id: true, name: true, description: true, prefix: true } }, + selection: { fields: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useMembershipTypesQuery({ const { mutate } = useCreateMembershipTypeMutation({ selection: { fields: { id: true } }, }); -mutate({ name: '', description: '', prefix: '' }); +mutate({ name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }); ``` diff --git a/.agents/skills/hooks-admin/references/org-member-profile.md b/.agents/skills/hooks-admin/references/org-member-profile.md new file mode 100644 index 000000000..6db233a60 --- /dev/null +++ b/.agents/skills/hooks-admin/references/org-member-profile.md @@ -0,0 +1,34 @@ +# orgMemberProfile + + + +Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + +## Usage + +```typescript +useOrgMemberProfilesQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } } }) +useOrgMemberProfileQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } } }) +useCreateOrgMemberProfileMutation({ selection: { fields: { id: true } } }) +useUpdateOrgMemberProfileMutation({ selection: { fields: { id: true } } }) +useDeleteOrgMemberProfileMutation({}) +``` + +## Examples + +### List all orgMemberProfiles + +```typescript +const { data, isLoading } = useOrgMemberProfilesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }, +}); +``` + +### Create a orgMemberProfile + +```typescript +const { mutate } = useCreateOrgMemberProfileMutation({ + selection: { fields: { id: true } }, +}); +mutate({ membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }); +``` diff --git a/.agents/skills/hooks-admin/references/org-membership.md b/.agents/skills/hooks-admin/references/org-membership.md index 1b7474e0c..b2e4cf040 100644 --- a/.agents/skills/hooks-admin/references/org-membership.md +++ b/.agents/skills/hooks-admin/references/org-membership.md @@ -7,8 +7,8 @@ Tracks membership records linking actors to entities with permission bitmasks, o ## Usage ```typescript -useOrgMembershipsQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } } }) -useOrgMembershipQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } } }) +useOrgMembershipsQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } } }) +useOrgMembershipQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } } }) useCreateOrgMembershipMutation({ selection: { fields: { id: true } } }) useUpdateOrgMembershipMutation({ selection: { fields: { id: true } } }) useDeleteOrgMembershipMutation({}) @@ -20,7 +20,7 @@ useDeleteOrgMembershipMutation({}) ```typescript const { data, isLoading } = useOrgMembershipsQuery({ - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useOrgMembershipsQuery({ const { mutate } = useCreateOrgMembershipMutation({ selection: { fields: { id: true } }, }); -mutate({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }); +mutate({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }); ``` diff --git a/.agents/skills/hooks-auth/SKILL.md b/.agents/skills/hooks-auth/SKILL.md index 5b28e5606..fc15b17b4 100644 --- a/.agents/skills/hooks-auth/SKILL.md +++ b/.agents/skills/hooks-auth/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-auth -description: React Query hooks for the auth API — provides typed query and mutation hooks for 7 tables and 23 custom operations +description: React Query hooks for the auth API — provides typed query and mutation hooks for 7 tables and 29 custom operations --- # hooks-auth -React Query hooks for the auth API — provides typed query and mutation hooks for 7 tables and 23 custom operations +React Query hooks for the auth API — provides typed query and mutation hooks for 7 tables and 29 custom operations ## Usage @@ -40,27 +40,33 @@ See the `references/` directory for detailed per-entity API documentation: - [email](references/email.md) - [phone-number](references/phone-number.md) - [crypto-address](references/crypto-address.md) -- [connected-account](references/connected-account.md) - [audit-log](references/audit-log.md) - [role-type](references/role-type.md) +- [user-connected-account](references/user-connected-account.md) - [user](references/user.md) -- [current-ip-address](references/current-ip-address.md) - [current-user-agent](references/current-user-agent.md) +- [current-ip-address](references/current-ip-address.md) - [current-user-id](references/current-user-id.md) +- [require-step-up](references/require-step-up.md) - [current-user](references/current-user.md) - [sign-out](references/sign-out.md) - [send-account-deletion-email](references/send-account-deletion-email.md) - [check-password](references/check-password.md) +- [disconnect-account](references/disconnect-account.md) +- [revoke-api-key](references/revoke-api-key.md) +- [revoke-session](references/revoke-session.md) - [verify-password](references/verify-password.md) - [verify-totp](references/verify-totp.md) - [confirm-delete-account](references/confirm-delete-account.md) - [set-password](references/set-password.md) - [verify-email](references/verify-email.md) +- [provision-new-user](references/provision-new-user.md) - [reset-password](references/reset-password.md) -- [sign-in-one-time-token](references/sign-in-one-time-token.md) -- [sign-in](references/sign-in.md) +- [create-api-key](references/create-api-key.md) +- [sign-in-cross-origin](references/sign-in-cross-origin.md) - [sign-up](references/sign-up.md) -- [one-time-token](references/one-time-token.md) +- [request-cross-origin-token](references/request-cross-origin-token.md) +- [sign-in](references/sign-in.md) - [extend-token-expires](references/extend-token-expires.md) - [forgot-password](references/forgot-password.md) - [send-verification-email](references/send-verification-email.md) diff --git a/.agents/skills/hooks-auth/references/create-api-key.md b/.agents/skills/hooks-auth/references/create-api-key.md new file mode 100644 index 000000000..0b3acfc32 --- /dev/null +++ b/.agents/skills/hooks-auth/references/create-api-key.md @@ -0,0 +1,20 @@ +# createApiKey + + + +React Query mutation hook for createApiKey + +## Usage + +```typescript +const { mutate } = useCreateApiKeyMutation(); mutate({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }); +``` + +## Examples + +### Use useCreateApiKeyMutation + +```typescript +const { mutate, isLoading } = useCreateApiKeyMutation(); +mutate({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/disconnect-account.md b/.agents/skills/hooks-auth/references/disconnect-account.md new file mode 100644 index 000000000..b328054bb --- /dev/null +++ b/.agents/skills/hooks-auth/references/disconnect-account.md @@ -0,0 +1,20 @@ +# disconnectAccount + + + +React Query mutation hook for disconnectAccount + +## Usage + +```typescript +const { mutate } = useDisconnectAccountMutation(); mutate({ input: { accountId: '' } }); +``` + +## Examples + +### Use useDisconnectAccountMutation + +```typescript +const { mutate, isLoading } = useDisconnectAccountMutation(); +mutate({ input: { accountId: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/provision-new-user.md b/.agents/skills/hooks-auth/references/provision-new-user.md new file mode 100644 index 000000000..b9b1f9abe --- /dev/null +++ b/.agents/skills/hooks-auth/references/provision-new-user.md @@ -0,0 +1,20 @@ +# provisionNewUser + + + +React Query mutation hook for provisionNewUser + +## Usage + +```typescript +const { mutate } = useProvisionNewUserMutation(); mutate({ input: { email: '', password: '' } }); +``` + +## Examples + +### Use useProvisionNewUserMutation + +```typescript +const { mutate, isLoading } = useProvisionNewUserMutation(); +mutate({ input: { email: '', password: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/request-cross-origin-token.md b/.agents/skills/hooks-auth/references/request-cross-origin-token.md new file mode 100644 index 000000000..dbd58cba0 --- /dev/null +++ b/.agents/skills/hooks-auth/references/request-cross-origin-token.md @@ -0,0 +1,20 @@ +# requestCrossOriginToken + + + +React Query mutation hook for requestCrossOriginToken + +## Usage + +```typescript +const { mutate } = useRequestCrossOriginTokenMutation(); mutate({ input: { email: '', password: '', origin: '', rememberMe: '' } }); +``` + +## Examples + +### Use useRequestCrossOriginTokenMutation + +```typescript +const { mutate, isLoading } = useRequestCrossOriginTokenMutation(); +mutate({ input: { email: '', password: '', origin: '', rememberMe: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/require-step-up.md b/.agents/skills/hooks-auth/references/require-step-up.md new file mode 100644 index 000000000..2870af2cb --- /dev/null +++ b/.agents/skills/hooks-auth/references/require-step-up.md @@ -0,0 +1,19 @@ +# requireStepUp + + + +React Query query hook for requireStepUp + +## Usage + +```typescript +useRequireStepUpQuery({ stepUpType: '' }) +``` + +## Examples + +### Use useRequireStepUpQuery + +```typescript +const { data, isLoading } = useRequireStepUpQuery({ stepUpType: '' }); +``` diff --git a/.agents/skills/hooks-auth/references/revoke-api-key.md b/.agents/skills/hooks-auth/references/revoke-api-key.md new file mode 100644 index 000000000..36399905a --- /dev/null +++ b/.agents/skills/hooks-auth/references/revoke-api-key.md @@ -0,0 +1,20 @@ +# revokeApiKey + + + +React Query mutation hook for revokeApiKey + +## Usage + +```typescript +const { mutate } = useRevokeApiKeyMutation(); mutate({ input: { keyId: '' } }); +``` + +## Examples + +### Use useRevokeApiKeyMutation + +```typescript +const { mutate, isLoading } = useRevokeApiKeyMutation(); +mutate({ input: { keyId: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/revoke-session.md b/.agents/skills/hooks-auth/references/revoke-session.md new file mode 100644 index 000000000..81c0bb618 --- /dev/null +++ b/.agents/skills/hooks-auth/references/revoke-session.md @@ -0,0 +1,20 @@ +# revokeSession + + + +React Query mutation hook for revokeSession + +## Usage + +```typescript +const { mutate } = useRevokeSessionMutation(); mutate({ input: { sessionId: '' } }); +``` + +## Examples + +### Use useRevokeSessionMutation + +```typescript +const { mutate, isLoading } = useRevokeSessionMutation(); +mutate({ input: { sessionId: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/sign-in-cross-origin.md b/.agents/skills/hooks-auth/references/sign-in-cross-origin.md new file mode 100644 index 000000000..87ca1799c --- /dev/null +++ b/.agents/skills/hooks-auth/references/sign-in-cross-origin.md @@ -0,0 +1,20 @@ +# signInCrossOrigin + + + +React Query mutation hook for signInCrossOrigin + +## Usage + +```typescript +const { mutate } = useSignInCrossOriginMutation(); mutate({ input: { token: '', credentialKind: '' } }); +``` + +## Examples + +### Use useSignInCrossOriginMutation + +```typescript +const { mutate, isLoading } = useSignInCrossOriginMutation(); +mutate({ input: { token: '', credentialKind: '' } }); +``` diff --git a/.agents/skills/hooks-auth/references/sign-in.md b/.agents/skills/hooks-auth/references/sign-in.md index 17190f8bd..ecb7a874d 100644 --- a/.agents/skills/hooks-auth/references/sign-in.md +++ b/.agents/skills/hooks-auth/references/sign-in.md @@ -7,7 +7,7 @@ React Query mutation hook for signIn ## Usage ```typescript -const { mutate } = useSignInMutation(); mutate({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }); +const { mutate } = useSignInMutation(); mutate({ input: '' }); ``` ## Examples @@ -16,5 +16,5 @@ const { mutate } = useSignInMutation(); mutate({ input: { email: '', pas ```typescript const { mutate, isLoading } = useSignInMutation(); -mutate({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }); +mutate({ input: '' }); ``` diff --git a/.agents/skills/hooks-auth/references/user-connected-account.md b/.agents/skills/hooks-auth/references/user-connected-account.md new file mode 100644 index 000000000..fb94c2567 --- /dev/null +++ b/.agents/skills/hooks-auth/references/user-connected-account.md @@ -0,0 +1,34 @@ +# userConnectedAccount + + + +React Query hooks for UserConnectedAccount data operations + +## Usage + +```typescript +useUserConnectedAccountsQuery({ selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } } }) +useUserConnectedAccountQuery({ id: '', selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } } }) +useCreateUserConnectedAccountMutation({ selection: { fields: { id: true } } }) +useUpdateUserConnectedAccountMutation({ selection: { fields: { id: true } } }) +useDeleteUserConnectedAccountMutation({}) +``` + +## Examples + +### List all userConnectedAccounts + +```typescript +const { data, isLoading } = useUserConnectedAccountsQuery({ + selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }, +}); +``` + +### Create a userConnectedAccount + +```typescript +const { mutate } = useCreateUserConnectedAccountMutation({ + selection: { fields: { id: true } }, +}); +mutate({ ownerId: '', service: '', identifier: '', details: '', isVerified: '' }); +``` diff --git a/.agents/skills/hooks-public/SKILL.md b/.agents/skills/hooks-public/SKILL.md index 1a11cf467..1301d5939 100644 --- a/.agents/skills/hooks-public/SKILL.md +++ b/.agents/skills/hooks-public/SKILL.md @@ -1,13 +1,13 @@ --- name: hooks-public -description: React Query hooks for the public API — provides typed query and mutation hooks for 109 tables and 64 custom operations +description: React Query hooks for the public API — provides typed query and mutation hooks for 114 tables and 72 custom operations --- # hooks-public -React Query hooks for the public API — provides typed query and mutation hooks for 109 tables and 64 custom operations +React Query hooks for the public API — provides typed query and mutation hooks for 114 tables and 72 custom operations ## Usage @@ -49,6 +49,7 @@ See the `references/` directory for detailed per-entity API documentation: - [table](references/table.md) - [check-constraint](references/check-constraint.md) - [field](references/field.md) +- [spatial-relation](references/spatial-relation.md) - [foreign-key-constraint](references/foreign-key-constraint.md) - [full-text-search](references/full-text-search.md) - [index](references/index.md) @@ -62,9 +63,9 @@ See the `references/` directory for detailed per-entity API documentation: - [view-grant](references/view-grant.md) - [view-rule](references/view-rule.md) - [embedding-chunk](references/embedding-chunk.md) -- [table-template-module](references/table-template-module.md) - [secure-table-provision](references/secure-table-provision.md) - [relation-provision](references/relation-provision.md) +- [session-secrets-module](references/session-secrets-module.md) - [schema-grant](references/schema-grant.md) - [default-privilege](references/default-privilege.md) - [enum](references/enum.md) @@ -102,6 +103,8 @@ See the `references/` directory for detailed per-entity API documentation: - [blueprint-template](references/blueprint-template.md) - [blueprint-construction](references/blueprint-construction.md) - [storage-module](references/storage-module.md) +- [entity-type-provision](references/entity-type-provision.md) +- [webauthn-credentials-module](references/webauthn-credentials-module.md) - [database-provision-module](references/database-provision-module.md) - [app-admin-grant](references/app-admin-grant.md) - [app-owner-grant](references/app-owner-grant.md) @@ -110,6 +113,7 @@ See the `references/` directory for detailed per-entity API documentation: - [org-member](references/org-member.md) - [org-admin-grant](references/org-admin-grant.md) - [org-owner-grant](references/org-owner-grant.md) +- [org-member-profile](references/org-member-profile.md) - [org-grant](references/org-grant.md) - [org-chart-edge](references/org-chart-edge.md) - [org-chart-edge-grant](references/org-chart-edge-grant.md) @@ -122,7 +126,6 @@ See the `references/` directory for detailed per-entity API documentation: - [email](references/email.md) - [phone-number](references/phone-number.md) - [crypto-address](references/crypto-address.md) -- [connected-account](references/connected-account.md) - [app-invite](references/app-invite.md) - [app-claimed-invite](references/app-claimed-invite.md) - [org-invite](references/org-invite.md) @@ -135,10 +138,12 @@ See the `references/` directory for detailed per-entity API documentation: - [migrate-file](references/migrate-file.md) - [app-limit-default](references/app-limit-default.md) - [org-limit-default](references/org-limit-default.md) -- [membership-type](references/membership-type.md) +- [devices-module](references/devices-module.md) +- [user-connected-account](references/user-connected-account.md) - [app-membership-default](references/app-membership-default.md) - [commit](references/commit.md) - [rate-limits-module](references/rate-limits-module.md) +- [membership-type](references/membership-type.md) - [org-membership-default](references/org-membership-default.md) - [rls-module](references/rls-module.md) - [sql-action](references/sql-action.md) @@ -147,12 +152,14 @@ See the `references/` directory for detailed per-entity API documentation: - [app-membership](references/app-membership.md) - [hierarchy-module](references/hierarchy-module.md) - [current-user-id](references/current-user-id.md) -- [current-ip-address](references/current-ip-address.md) - [current-user-agent](references/current-user-agent.md) +- [current-ip-address](references/current-ip-address.md) +- [require-step-up](references/require-step-up.md) - [app-permissions-get-padded-mask](references/app-permissions-get-padded-mask.md) - [org-permissions-get-padded-mask](references/org-permissions-get-padded-mask.md) - [steps-achieved](references/steps-achieved.md) - [rev-parse](references/rev-parse.md) +- [resolve-blueprint-field](references/resolve-blueprint-field.md) - [org-is-manager-of](references/org-is-manager-of.md) - [app-permissions-get-mask](references/app-permissions-get-mask.md) - [org-permissions-get-mask](references/org-permissions-get-mask.md) @@ -171,6 +178,9 @@ See the `references/` directory for detailed per-entity API documentation: - [accept-database-transfer](references/accept-database-transfer.md) - [cancel-database-transfer](references/cancel-database-transfer.md) - [reject-database-transfer](references/reject-database-transfer.md) +- [disconnect-account](references/disconnect-account.md) +- [revoke-api-key](references/revoke-api-key.md) +- [revoke-session](references/revoke-session.md) - [verify-password](references/verify-password.md) - [verify-totp](references/verify-totp.md) - [submit-app-invite-code](references/submit-app-invite-code.md) @@ -182,9 +192,12 @@ See the `references/` directory for detailed per-entity API documentation: - [freeze-objects](references/freeze-objects.md) - [init-empty-repo](references/init-empty-repo.md) - [construct-blueprint](references/construct-blueprint.md) +- [provision-new-user](references/provision-new-user.md) - [reset-password](references/reset-password.md) - [remove-node-at-path](references/remove-node-at-path.md) - [copy-template-to-blueprint](references/copy-template-to-blueprint.md) +- [create-api-key](references/create-api-key.md) +- [provision-spatial-relation](references/provision-spatial-relation.md) - [bootstrap-user](references/bootstrap-user.md) - [set-field-order](references/set-field-order.md) - [provision-unique-constraint](references/provision-unique-constraint.md) @@ -198,12 +211,12 @@ See the `references/` directory for detailed per-entity API documentation: - [set-and-commit](references/set-and-commit.md) - [provision-relation](references/provision-relation.md) - [apply-rls](references/apply-rls.md) -- [sign-in-one-time-token](references/sign-in-one-time-token.md) +- [sign-in-cross-origin](references/sign-in-cross-origin.md) - [create-user-database](references/create-user-database.md) - [extend-token-expires](references/extend-token-expires.md) -- [sign-in](references/sign-in.md) - [sign-up](references/sign-up.md) -- [one-time-token](references/one-time-token.md) +- [request-cross-origin-token](references/request-cross-origin-token.md) +- [sign-in](references/sign-in.md) - [provision-table](references/provision-table.md) - [send-verification-email](references/send-verification-email.md) - [forgot-password](references/forgot-password.md) diff --git a/.agents/skills/hooks-public/references/app-membership.md b/.agents/skills/hooks-public/references/app-membership.md index b8d352ef8..75b48ac9c 100644 --- a/.agents/skills/hooks-public/references/app-membership.md +++ b/.agents/skills/hooks-public/references/app-membership.md @@ -7,8 +7,8 @@ Tracks membership records linking actors to entities with permission bitmasks, o ## Usage ```typescript -useAppMembershipsQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } } }) -useAppMembershipQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } } }) +useAppMembershipsQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } } }) +useAppMembershipQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } } }) useCreateAppMembershipMutation({ selection: { fields: { id: true } } }) useUpdateAppMembershipMutation({ selection: { fields: { id: true } } }) useDeleteAppMembershipMutation({}) @@ -20,7 +20,7 @@ useDeleteAppMembershipMutation({}) ```typescript const { data, isLoading } = useAppMembershipsQuery({ - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useAppMembershipsQuery({ const { mutate } = useCreateAppMembershipMutation({ selection: { fields: { id: true } }, }); -mutate({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }); +mutate({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }); ``` diff --git a/.agents/skills/hooks-public/references/construct-blueprint.md b/.agents/skills/hooks-public/references/construct-blueprint.md index 084fb629f..a49259f8b 100644 --- a/.agents/skills/hooks-public/references/construct-blueprint.md +++ b/.agents/skills/hooks-public/references/construct-blueprint.md @@ -2,7 +2,7 @@ -Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. +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 diff --git a/.agents/skills/hooks-public/references/create-api-key.md b/.agents/skills/hooks-public/references/create-api-key.md new file mode 100644 index 000000000..0b3acfc32 --- /dev/null +++ b/.agents/skills/hooks-public/references/create-api-key.md @@ -0,0 +1,20 @@ +# createApiKey + + + +React Query mutation hook for createApiKey + +## Usage + +```typescript +const { mutate } = useCreateApiKeyMutation(); mutate({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }); +``` + +## Examples + +### Use useCreateApiKeyMutation + +```typescript +const { mutate, isLoading } = useCreateApiKeyMutation(); +mutate({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }); +``` diff --git a/.agents/skills/hooks-public/references/devices-module.md b/.agents/skills/hooks-public/references/devices-module.md new file mode 100644 index 000000000..d1c5489cd --- /dev/null +++ b/.agents/skills/hooks-public/references/devices-module.md @@ -0,0 +1,34 @@ +# devicesModule + + + +React Query hooks for DevicesModule data operations + +## Usage + +```typescript +useDevicesModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } } }) +useDevicesModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } } }) +useCreateDevicesModuleMutation({ selection: { fields: { id: true } } }) +useUpdateDevicesModuleMutation({ selection: { fields: { id: true } } }) +useDeleteDevicesModuleMutation({}) +``` + +## Examples + +### List all devicesModules + +```typescript +const { data, isLoading } = useDevicesModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } }, +}); +``` + +### Create a devicesModule + +```typescript +const { mutate } = useCreateDevicesModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', schemaId: '', userDevicesTableId: '', deviceSettingsTableId: '', userDevicesTable: '', deviceSettingsTable: '' }); +``` diff --git a/.agents/skills/hooks-public/references/disconnect-account.md b/.agents/skills/hooks-public/references/disconnect-account.md new file mode 100644 index 000000000..b328054bb --- /dev/null +++ b/.agents/skills/hooks-public/references/disconnect-account.md @@ -0,0 +1,20 @@ +# disconnectAccount + + + +React Query mutation hook for disconnectAccount + +## Usage + +```typescript +const { mutate } = useDisconnectAccountMutation(); mutate({ input: { accountId: '' } }); +``` + +## Examples + +### Use useDisconnectAccountMutation + +```typescript +const { mutate, isLoading } = useDisconnectAccountMutation(); +mutate({ input: { accountId: '' } }); +``` diff --git a/.agents/skills/hooks-public/references/entity-type-provision.md b/.agents/skills/hooks-public/references/entity-type-provision.md new file mode 100644 index 000000000..0c6dbf37d --- /dev/null +++ b/.agents/skills/hooks-public/references/entity-type-provision.md @@ -0,0 +1,41 @@ +# entityTypeProvision + + + +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 + +```typescript +useEntityTypeProvisionsQuery({ selection: { fields: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } } }) +useEntityTypeProvisionQuery({ id: '', selection: { fields: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } } }) +useCreateEntityTypeProvisionMutation({ selection: { fields: { id: true } } }) +useUpdateEntityTypeProvisionMutation({ selection: { fields: { id: true } } }) +useDeleteEntityTypeProvisionMutation({}) +``` + +## Examples + +### List all entityTypeProvisions + +```typescript +const { data, isLoading } = useEntityTypeProvisionsQuery({ + selection: { fields: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } }, +}); +``` + +### Create a entityTypeProvision + +```typescript +const { mutate } = useCreateEntityTypeProvisionMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', name: '', prefix: '', description: '', parentEntity: '', tableName: '', isVisible: '', hasLimits: '', hasProfiles: '', hasLevels: '', skipEntityPolicies: '', tableProvision: '', outMembershipType: '', outEntityTableId: '', outEntityTableName: '', outInstalledModules: '' }); +``` diff --git a/.agents/skills/hooks-public/references/membership-type.md b/.agents/skills/hooks-public/references/membership-type.md index 8d627c5cc..6273754ce 100644 --- a/.agents/skills/hooks-public/references/membership-type.md +++ b/.agents/skills/hooks-public/references/membership-type.md @@ -7,8 +7,8 @@ Defines the different scopes of membership (e.g. App Member, Organization Member ## Usage ```typescript -useMembershipTypesQuery({ selection: { fields: { id: true, name: true, description: true, prefix: true } } }) -useMembershipTypeQuery({ id: '', selection: { fields: { id: true, name: true, description: true, prefix: true } } }) +useMembershipTypesQuery({ selection: { fields: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } } }) +useMembershipTypeQuery({ id: '', selection: { fields: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } } }) useCreateMembershipTypeMutation({ selection: { fields: { id: true } } }) useUpdateMembershipTypeMutation({ selection: { fields: { id: true } } }) useDeleteMembershipTypeMutation({}) @@ -20,7 +20,7 @@ useDeleteMembershipTypeMutation({}) ```typescript const { data, isLoading } = useMembershipTypesQuery({ - selection: { fields: { id: true, name: true, description: true, prefix: true } }, + selection: { fields: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useMembershipTypesQuery({ const { mutate } = useCreateMembershipTypeMutation({ selection: { fields: { id: true } }, }); -mutate({ name: '', description: '', prefix: '' }); +mutate({ name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }); ``` diff --git a/.agents/skills/hooks-public/references/memberships-module.md b/.agents/skills/hooks-public/references/memberships-module.md index c5108a258..5d1e8feea 100644 --- a/.agents/skills/hooks-public/references/memberships-module.md +++ b/.agents/skills/hooks-public/references/memberships-module.md @@ -7,8 +7,8 @@ React Query hooks for MembershipsModule data operations ## Usage ```typescript -useMembershipsModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } } }) -useMembershipsModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } } }) +useMembershipsModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } } }) +useMembershipsModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } } }) useCreateMembershipsModuleMutation({ selection: { fields: { id: true } } }) useUpdateMembershipsModuleMutation({ selection: { fields: { id: true } } }) useDeleteMembershipsModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteMembershipsModuleMutation({}) ```typescript const { data, isLoading } = useMembershipsModulesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useMembershipsModulesQuery({ const { mutate } = useCreateMembershipsModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '' }); +mutate({ databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', memberProfilesTableId: '' }); ``` diff --git a/.agents/skills/hooks-public/references/org-member-profile.md b/.agents/skills/hooks-public/references/org-member-profile.md new file mode 100644 index 000000000..6db233a60 --- /dev/null +++ b/.agents/skills/hooks-public/references/org-member-profile.md @@ -0,0 +1,34 @@ +# orgMemberProfile + + + +Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + +## Usage + +```typescript +useOrgMemberProfilesQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } } }) +useOrgMemberProfileQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } } }) +useCreateOrgMemberProfileMutation({ selection: { fields: { id: true } } }) +useUpdateOrgMemberProfileMutation({ selection: { fields: { id: true } } }) +useDeleteOrgMemberProfileMutation({}) +``` + +## Examples + +### List all orgMemberProfiles + +```typescript +const { data, isLoading } = useOrgMemberProfilesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }, +}); +``` + +### Create a orgMemberProfile + +```typescript +const { mutate } = useCreateOrgMemberProfileMutation({ + selection: { fields: { id: true } }, +}); +mutate({ membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }); +``` diff --git a/.agents/skills/hooks-public/references/org-membership.md b/.agents/skills/hooks-public/references/org-membership.md index 1b7474e0c..b2e4cf040 100644 --- a/.agents/skills/hooks-public/references/org-membership.md +++ b/.agents/skills/hooks-public/references/org-membership.md @@ -7,8 +7,8 @@ Tracks membership records linking actors to entities with permission bitmasks, o ## Usage ```typescript -useOrgMembershipsQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } } }) -useOrgMembershipQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } } }) +useOrgMembershipsQuery({ selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } } }) +useOrgMembershipQuery({ id: '', selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } } }) useCreateOrgMembershipMutation({ selection: { fields: { id: true } } }) useUpdateOrgMembershipMutation({ selection: { fields: { id: true } } }) useDeleteOrgMembershipMutation({}) @@ -20,7 +20,7 @@ useDeleteOrgMembershipMutation({}) ```typescript const { data, isLoading } = useOrgMembershipsQuery({ - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useOrgMembershipsQuery({ const { mutate } = useCreateOrgMembershipMutation({ selection: { fields: { id: true } }, }); -mutate({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }); +mutate({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }); ``` diff --git a/.agents/skills/hooks-public/references/provision-new-user.md b/.agents/skills/hooks-public/references/provision-new-user.md new file mode 100644 index 000000000..b9b1f9abe --- /dev/null +++ b/.agents/skills/hooks-public/references/provision-new-user.md @@ -0,0 +1,20 @@ +# provisionNewUser + + + +React Query mutation hook for provisionNewUser + +## Usage + +```typescript +const { mutate } = useProvisionNewUserMutation(); mutate({ input: { email: '', password: '' } }); +``` + +## Examples + +### Use useProvisionNewUserMutation + +```typescript +const { mutate, isLoading } = useProvisionNewUserMutation(); +mutate({ input: { email: '', password: '' } }); +``` diff --git a/.agents/skills/hooks-public/references/provision-spatial-relation.md b/.agents/skills/hooks-public/references/provision-spatial-relation.md new file mode 100644 index 000000000..9392c2413 --- /dev/null +++ b/.agents/skills/hooks-public/references/provision-spatial-relation.md @@ -0,0 +1,20 @@ +# provisionSpatialRelation + + + +Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + +## Usage + +```typescript +const { mutate } = useProvisionSpatialRelationMutation(); mutate({ input: '' }); +``` + +## Examples + +### Use useProvisionSpatialRelationMutation + +```typescript +const { mutate, isLoading } = useProvisionSpatialRelationMutation(); +mutate({ input: '' }); +``` diff --git a/.agents/skills/hooks-public/references/request-cross-origin-token.md b/.agents/skills/hooks-public/references/request-cross-origin-token.md new file mode 100644 index 000000000..dbd58cba0 --- /dev/null +++ b/.agents/skills/hooks-public/references/request-cross-origin-token.md @@ -0,0 +1,20 @@ +# requestCrossOriginToken + + + +React Query mutation hook for requestCrossOriginToken + +## Usage + +```typescript +const { mutate } = useRequestCrossOriginTokenMutation(); mutate({ input: { email: '', password: '', origin: '', rememberMe: '' } }); +``` + +## Examples + +### Use useRequestCrossOriginTokenMutation + +```typescript +const { mutate, isLoading } = useRequestCrossOriginTokenMutation(); +mutate({ input: { email: '', password: '', origin: '', rememberMe: '' } }); +``` diff --git a/.agents/skills/hooks-public/references/require-step-up.md b/.agents/skills/hooks-public/references/require-step-up.md new file mode 100644 index 000000000..2870af2cb --- /dev/null +++ b/.agents/skills/hooks-public/references/require-step-up.md @@ -0,0 +1,19 @@ +# requireStepUp + + + +React Query query hook for requireStepUp + +## Usage + +```typescript +useRequireStepUpQuery({ stepUpType: '' }) +``` + +## Examples + +### Use useRequireStepUpQuery + +```typescript +const { data, isLoading } = useRequireStepUpQuery({ stepUpType: '' }); +``` diff --git a/.agents/skills/hooks-public/references/resolve-blueprint-field.md b/.agents/skills/hooks-public/references/resolve-blueprint-field.md new file mode 100644 index 000000000..703251d08 --- /dev/null +++ b/.agents/skills/hooks-public/references/resolve-blueprint-field.md @@ -0,0 +1,19 @@ +# resolveBlueprintField + + + +Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + +## Usage + +```typescript +useResolveBlueprintFieldQuery({ databaseId: '', tableId: '', fieldName: '' }) +``` + +## Examples + +### Use useResolveBlueprintFieldQuery + +```typescript +const { data, isLoading } = useResolveBlueprintFieldQuery({ databaseId: '', tableId: '', fieldName: '' }); +``` diff --git a/.agents/skills/hooks-public/references/revoke-api-key.md b/.agents/skills/hooks-public/references/revoke-api-key.md new file mode 100644 index 000000000..36399905a --- /dev/null +++ b/.agents/skills/hooks-public/references/revoke-api-key.md @@ -0,0 +1,20 @@ +# revokeApiKey + + + +React Query mutation hook for revokeApiKey + +## Usage + +```typescript +const { mutate } = useRevokeApiKeyMutation(); mutate({ input: { keyId: '' } }); +``` + +## Examples + +### Use useRevokeApiKeyMutation + +```typescript +const { mutate, isLoading } = useRevokeApiKeyMutation(); +mutate({ input: { keyId: '' } }); +``` diff --git a/.agents/skills/hooks-public/references/revoke-session.md b/.agents/skills/hooks-public/references/revoke-session.md new file mode 100644 index 000000000..81c0bb618 --- /dev/null +++ b/.agents/skills/hooks-public/references/revoke-session.md @@ -0,0 +1,20 @@ +# revokeSession + + + +React Query mutation hook for revokeSession + +## Usage + +```typescript +const { mutate } = useRevokeSessionMutation(); mutate({ input: { sessionId: '' } }); +``` + +## Examples + +### Use useRevokeSessionMutation + +```typescript +const { mutate, isLoading } = useRevokeSessionMutation(); +mutate({ input: { sessionId: '' } }); +``` diff --git a/.agents/skills/hooks-public/references/session-secrets-module.md b/.agents/skills/hooks-public/references/session-secrets-module.md new file mode 100644 index 000000000..d074e3bac --- /dev/null +++ b/.agents/skills/hooks-public/references/session-secrets-module.md @@ -0,0 +1,34 @@ +# sessionSecretsModule + + + +Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + +## Usage + +```typescript +useSessionSecretsModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } } }) +useSessionSecretsModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } } }) +useCreateSessionSecretsModuleMutation({ selection: { fields: { id: true } } }) +useUpdateSessionSecretsModuleMutation({ selection: { fields: { id: true } } }) +useDeleteSessionSecretsModuleMutation({}) +``` + +## Examples + +### List all sessionSecretsModules + +```typescript +const { data, isLoading } = useSessionSecretsModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } }, +}); +``` + +### Create a sessionSecretsModule + +```typescript +const { mutate } = useCreateSessionSecretsModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', schemaId: '', tableId: '', tableName: '', sessionsTableId: '' }); +``` diff --git a/.agents/skills/hooks-public/references/sign-in-cross-origin.md b/.agents/skills/hooks-public/references/sign-in-cross-origin.md new file mode 100644 index 000000000..87ca1799c --- /dev/null +++ b/.agents/skills/hooks-public/references/sign-in-cross-origin.md @@ -0,0 +1,20 @@ +# signInCrossOrigin + + + +React Query mutation hook for signInCrossOrigin + +## Usage + +```typescript +const { mutate } = useSignInCrossOriginMutation(); mutate({ input: { token: '', credentialKind: '' } }); +``` + +## Examples + +### Use useSignInCrossOriginMutation + +```typescript +const { mutate, isLoading } = useSignInCrossOriginMutation(); +mutate({ input: { token: '', credentialKind: '' } }); +``` diff --git a/.agents/skills/hooks-public/references/sign-in.md b/.agents/skills/hooks-public/references/sign-in.md index 17190f8bd..ecb7a874d 100644 --- a/.agents/skills/hooks-public/references/sign-in.md +++ b/.agents/skills/hooks-public/references/sign-in.md @@ -7,7 +7,7 @@ React Query mutation hook for signIn ## Usage ```typescript -const { mutate } = useSignInMutation(); mutate({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }); +const { mutate } = useSignInMutation(); mutate({ input: '' }); ``` ## Examples @@ -16,5 +16,5 @@ const { mutate } = useSignInMutation(); mutate({ input: { email: '', pas ```typescript const { mutate, isLoading } = useSignInMutation(); -mutate({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }); +mutate({ input: '' }); ``` diff --git a/.agents/skills/hooks-public/references/spatial-relation.md b/.agents/skills/hooks-public/references/spatial-relation.md new file mode 100644 index 000000000..2ace88404 --- /dev/null +++ b/.agents/skills/hooks-public/references/spatial-relation.md @@ -0,0 +1,34 @@ +# spatialRelation + + + +React Query hooks for SpatialRelation data operations + +## Usage + +```typescript +useSpatialRelationsQuery({ selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) +useSpatialRelationQuery({ id: '', selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } } }) +useCreateSpatialRelationMutation({ selection: { fields: { id: true } } }) +useUpdateSpatialRelationMutation({ selection: { fields: { id: true } } }) +useDeleteSpatialRelationMutation({}) +``` + +## Examples + +### List all spatialRelations + +```typescript +const { data, isLoading } = useSpatialRelationsQuery({ + selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, +}); +``` + +### Create a spatialRelation + +```typescript +const { mutate } = useCreateSpatialRelationMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', module: '', scope: '', tags: '' }); +``` diff --git a/.agents/skills/hooks-public/references/user-auth-module.md b/.agents/skills/hooks-public/references/user-auth-module.md index ec0a2dd76..947074d49 100644 --- a/.agents/skills/hooks-public/references/user-auth-module.md +++ b/.agents/skills/hooks-public/references/user-auth-module.md @@ -7,8 +7,8 @@ React Query hooks for UserAuthModule data operations ## Usage ```typescript -useUserAuthModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } } }) -useUserAuthModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } } }) +useUserAuthModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } } }) +useUserAuthModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } } }) useCreateUserAuthModuleMutation({ selection: { fields: { id: true } } }) useUpdateUserAuthModuleMutation({ selection: { fields: { id: true } } }) useDeleteUserAuthModuleMutation({}) @@ -20,7 +20,7 @@ useDeleteUserAuthModuleMutation({}) ```typescript const { data, isLoading } = useUserAuthModulesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } }, }); ``` @@ -30,5 +30,5 @@ const { data, isLoading } = useUserAuthModulesQuery({ const { mutate } = useCreateUserAuthModuleMutation({ selection: { fields: { id: true } }, }); -mutate({ databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInOneTimeTokenFunction: '', oneTimeTokenFunction: '', extendTokenExpires: '' }); +mutate({ databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInCrossOriginFunction: '', requestCrossOriginTokenFunction: '', extendTokenExpires: '' }); ``` diff --git a/.agents/skills/hooks-public/references/user-connected-account.md b/.agents/skills/hooks-public/references/user-connected-account.md new file mode 100644 index 000000000..fb94c2567 --- /dev/null +++ b/.agents/skills/hooks-public/references/user-connected-account.md @@ -0,0 +1,34 @@ +# userConnectedAccount + + + +React Query hooks for UserConnectedAccount data operations + +## Usage + +```typescript +useUserConnectedAccountsQuery({ selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } } }) +useUserConnectedAccountQuery({ id: '', selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } } }) +useCreateUserConnectedAccountMutation({ selection: { fields: { id: true } } }) +useUpdateUserConnectedAccountMutation({ selection: { fields: { id: true } } }) +useDeleteUserConnectedAccountMutation({}) +``` + +## Examples + +### List all userConnectedAccounts + +```typescript +const { data, isLoading } = useUserConnectedAccountsQuery({ + selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }, +}); +``` + +### Create a userConnectedAccount + +```typescript +const { mutate } = useCreateUserConnectedAccountMutation({ + selection: { fields: { id: true } }, +}); +mutate({ ownerId: '', service: '', identifier: '', details: '', isVerified: '' }); +``` diff --git a/.agents/skills/hooks-public/references/webauthn-credentials-module.md b/.agents/skills/hooks-public/references/webauthn-credentials-module.md new file mode 100644 index 000000000..af4aca728 --- /dev/null +++ b/.agents/skills/hooks-public/references/webauthn-credentials-module.md @@ -0,0 +1,34 @@ +# webauthnCredentialsModule + + + +Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + +## Usage + +```typescript +useWebauthnCredentialsModulesQuery({ selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } } }) +useWebauthnCredentialsModuleQuery({ id: '', selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } } }) +useCreateWebauthnCredentialsModuleMutation({ selection: { fields: { id: true } } }) +useUpdateWebauthnCredentialsModuleMutation({ selection: { fields: { id: true } } }) +useDeleteWebauthnCredentialsModuleMutation({}) +``` + +## Examples + +### List all webauthnCredentialsModules + +```typescript +const { data, isLoading } = useWebauthnCredentialsModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } }, +}); +``` + +### Create a webauthnCredentialsModule + +```typescript +const { mutate } = useCreateWebauthnCredentialsModuleMutation({ + selection: { fields: { id: true } }, +}); +mutate({ databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '' }); +``` diff --git a/.agents/skills/orm-admin/SKILL.md b/.agents/skills/orm-admin/SKILL.md index d6101ffbd..43f62367d 100644 --- a/.agents/skills/orm-admin/SKILL.md +++ b/.agents/skills/orm-admin/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-admin -description: ORM client for the admin API — provides typed CRUD operations for 32 tables and 16 custom operations +description: ORM client for the admin API — provides typed CRUD operations for 33 tables and 16 custom operations --- # orm-admin -ORM client for the admin API — provides typed CRUD operations for 32 tables and 16 custom operations +ORM client for the admin API — provides typed CRUD operations for 33 tables and 16 custom operations ## Usage @@ -51,24 +51,25 @@ See the `references/` directory for detailed per-entity API documentation: - [org-limit-default](references/org-limit-default.md) - [org-admin-grant](references/org-admin-grant.md) - [org-owner-grant](references/org-owner-grant.md) -- [membership-type](references/membership-type.md) - [app-limit](references/app-limit.md) - [app-achievement](references/app-achievement.md) - [app-step](references/app-step.md) - [app-claimed-invite](references/app-claimed-invite.md) - [org-chart-edge-grant](references/org-chart-edge-grant.md) - [org-limit](references/org-limit.md) +- [membership-type](references/membership-type.md) - [app-grant](references/app-grant.md) - [app-membership-default](references/app-membership-default.md) - [org-claimed-invite](references/org-claimed-invite.md) - [org-grant](references/org-grant.md) - [org-chart-edge](references/org-chart-edge.md) - [org-membership-default](references/org-membership-default.md) +- [org-member-profile](references/org-member-profile.md) - [app-level](references/app-level.md) - [app-invite](references/app-invite.md) +- [org-invite](references/org-invite.md) - [app-membership](references/app-membership.md) - [org-membership](references/org-membership.md) -- [org-invite](references/org-invite.md) - [app-permissions-get-padded-mask](references/app-permissions-get-padded-mask.md) - [org-permissions-get-padded-mask](references/org-permissions-get-padded-mask.md) - [org-is-manager-of](references/org-is-manager-of.md) diff --git a/.agents/skills/orm-admin/references/app-membership.md b/.agents/skills/orm-admin/references/app-membership.md index b71afa545..85ab2af03 100644 --- a/.agents/skills/orm-admin/references/app-membership.md +++ b/.agents/skills/orm-admin/references/app-membership.md @@ -9,7 +9,7 @@ Tracks membership records linking actors to entities with permission bitmasks, o ```typescript db.appMembership.findMany({ select: { id: true } }).execute() db.appMembership.findOne({ id: '', select: { id: true } }).execute() -db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute() +db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute() db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute() db.appMembership.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.appMembership.findMany({ ```typescript const item = await db.appMembership.create({ - data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, + data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-admin/references/membership-type.md b/.agents/skills/orm-admin/references/membership-type.md index 7712dd2ca..d6d7e36a1 100644 --- a/.agents/skills/orm-admin/references/membership-type.md +++ b/.agents/skills/orm-admin/references/membership-type.md @@ -9,7 +9,7 @@ Defines the different scopes of membership (e.g. App Member, Organization Member ```typescript db.membershipType.findMany({ select: { id: true } }).execute() db.membershipType.findOne({ id: '', select: { id: true } }).execute() -db.membershipType.create({ data: { name: '', description: '', prefix: '' }, select: { id: true } }).execute() +db.membershipType.create({ data: { name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }, select: { id: true } }).execute() db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute() db.membershipType.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.membershipType.findMany({ ```typescript const item = await db.membershipType.create({ - data: { name: '', description: '', prefix: '' }, + data: { name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-admin/references/org-member-profile.md b/.agents/skills/orm-admin/references/org-member-profile.md new file mode 100644 index 000000000..09a8f167a --- /dev/null +++ b/.agents/skills/orm-admin/references/org-member-profile.md @@ -0,0 +1,34 @@ +# orgMemberProfile + + + +Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + +## Usage + +```typescript +db.orgMemberProfile.findMany({ select: { id: true } }).execute() +db.orgMemberProfile.findOne({ id: '', select: { id: true } }).execute() +db.orgMemberProfile.create({ data: { membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }, select: { id: true } }).execute() +db.orgMemberProfile.update({ where: { id: '' }, data: { membershipId: '' }, select: { id: true } }).execute() +db.orgMemberProfile.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgMemberProfile records + +```typescript +const items = await db.orgMemberProfile.findMany({ + select: { id: true, membershipId: true } +}).execute(); +``` + +### Create a orgMemberProfile + +```typescript +const item = await db.orgMemberProfile.create({ + data: { membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-admin/references/org-membership.md b/.agents/skills/orm-admin/references/org-membership.md index b3af9e329..6407f09ee 100644 --- a/.agents/skills/orm-admin/references/org-membership.md +++ b/.agents/skills/orm-admin/references/org-membership.md @@ -9,7 +9,7 @@ Tracks membership records linking actors to entities with permission bitmasks, o ```typescript db.orgMembership.findMany({ select: { id: true } }).execute() db.orgMembership.findOne({ id: '', select: { id: true } }).execute() -db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }, select: { id: true } }).execute() +db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }, select: { id: true } }).execute() db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute() db.orgMembership.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.orgMembership.findMany({ ```typescript const item = await db.orgMembership.create({ - data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }, + data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-auth/SKILL.md b/.agents/skills/orm-auth/SKILL.md index 8c11f2bbb..9e6c52216 100644 --- a/.agents/skills/orm-auth/SKILL.md +++ b/.agents/skills/orm-auth/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-auth -description: ORM client for the auth API — provides typed CRUD operations for 7 tables and 23 custom operations +description: ORM client for the auth API — provides typed CRUD operations for 7 tables and 29 custom operations --- # orm-auth -ORM client for the auth API — provides typed CRUD operations for 7 tables and 23 custom operations +ORM client for the auth API — provides typed CRUD operations for 7 tables and 29 custom operations ## Usage @@ -15,7 +15,7 @@ ORM client for the auth API — provides typed CRUD operations for 7 tables and // Import the ORM client import { db } from './orm'; -// Available models: email, phoneNumber, cryptoAddress, connectedAccount, auditLog, roleType, user +// Available models: email, phoneNumber, cryptoAddress, auditLog, roleType, userConnectedAccount, user db..findMany({ select: { id: true } }).execute() db..findOne({ id: '', select: { id: true } }).execute() db..create({ data: { ... }, select: { id: true } }).execute() @@ -40,27 +40,33 @@ See the `references/` directory for detailed per-entity API documentation: - [email](references/email.md) - [phone-number](references/phone-number.md) - [crypto-address](references/crypto-address.md) -- [connected-account](references/connected-account.md) - [audit-log](references/audit-log.md) - [role-type](references/role-type.md) +- [user-connected-account](references/user-connected-account.md) - [user](references/user.md) -- [current-ip-address](references/current-ip-address.md) - [current-user-agent](references/current-user-agent.md) +- [current-ip-address](references/current-ip-address.md) - [current-user-id](references/current-user-id.md) +- [require-step-up](references/require-step-up.md) - [current-user](references/current-user.md) - [sign-out](references/sign-out.md) - [send-account-deletion-email](references/send-account-deletion-email.md) - [check-password](references/check-password.md) +- [disconnect-account](references/disconnect-account.md) +- [revoke-api-key](references/revoke-api-key.md) +- [revoke-session](references/revoke-session.md) - [verify-password](references/verify-password.md) - [verify-totp](references/verify-totp.md) - [confirm-delete-account](references/confirm-delete-account.md) - [set-password](references/set-password.md) - [verify-email](references/verify-email.md) +- [provision-new-user](references/provision-new-user.md) - [reset-password](references/reset-password.md) -- [sign-in-one-time-token](references/sign-in-one-time-token.md) -- [sign-in](references/sign-in.md) +- [create-api-key](references/create-api-key.md) +- [sign-in-cross-origin](references/sign-in-cross-origin.md) - [sign-up](references/sign-up.md) -- [one-time-token](references/one-time-token.md) +- [request-cross-origin-token](references/request-cross-origin-token.md) +- [sign-in](references/sign-in.md) - [extend-token-expires](references/extend-token-expires.md) - [forgot-password](references/forgot-password.md) - [send-verification-email](references/send-verification-email.md) diff --git a/.agents/skills/orm-auth/references/create-api-key.md b/.agents/skills/orm-auth/references/create-api-key.md new file mode 100644 index 000000000..3d2db3a70 --- /dev/null +++ b/.agents/skills/orm-auth/references/create-api-key.md @@ -0,0 +1,19 @@ +# createApiKey + + + +Execute the createApiKey mutation + +## Usage + +```typescript +db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }).execute() +``` + +## Examples + +### Run createApiKey + +```typescript +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/disconnect-account.md b/.agents/skills/orm-auth/references/disconnect-account.md new file mode 100644 index 000000000..f67b1ba94 --- /dev/null +++ b/.agents/skills/orm-auth/references/disconnect-account.md @@ -0,0 +1,19 @@ +# disconnectAccount + + + +Execute the disconnectAccount mutation + +## Usage + +```typescript +db.mutation.disconnectAccount({ input: { accountId: '' } }).execute() +``` + +## Examples + +### Run disconnectAccount + +```typescript +const result = await db.mutation.disconnectAccount({ input: { accountId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/provision-new-user.md b/.agents/skills/orm-auth/references/provision-new-user.md new file mode 100644 index 000000000..b5b29a133 --- /dev/null +++ b/.agents/skills/orm-auth/references/provision-new-user.md @@ -0,0 +1,19 @@ +# provisionNewUser + + + +Execute the provisionNewUser mutation + +## Usage + +```typescript +db.mutation.provisionNewUser({ input: { email: '', password: '' } }).execute() +``` + +## Examples + +### Run provisionNewUser + +```typescript +const result = await db.mutation.provisionNewUser({ input: { email: '', password: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/request-cross-origin-token.md b/.agents/skills/orm-auth/references/request-cross-origin-token.md new file mode 100644 index 000000000..10572d142 --- /dev/null +++ b/.agents/skills/orm-auth/references/request-cross-origin-token.md @@ -0,0 +1,19 @@ +# requestCrossOriginToken + + + +Execute the requestCrossOriginToken mutation + +## Usage + +```typescript +db.mutation.requestCrossOriginToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute() +``` + +## Examples + +### Run requestCrossOriginToken + +```typescript +const result = await db.mutation.requestCrossOriginToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/require-step-up.md b/.agents/skills/orm-auth/references/require-step-up.md new file mode 100644 index 000000000..a0838149e --- /dev/null +++ b/.agents/skills/orm-auth/references/require-step-up.md @@ -0,0 +1,19 @@ +# requireStepUp + + + +Execute the requireStepUp query + +## Usage + +```typescript +db.query.requireStepUp({ stepUpType: '' }).execute() +``` + +## Examples + +### Run requireStepUp + +```typescript +const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/revoke-api-key.md b/.agents/skills/orm-auth/references/revoke-api-key.md new file mode 100644 index 000000000..08dd4669a --- /dev/null +++ b/.agents/skills/orm-auth/references/revoke-api-key.md @@ -0,0 +1,19 @@ +# revokeApiKey + + + +Execute the revokeApiKey mutation + +## Usage + +```typescript +db.mutation.revokeApiKey({ input: { keyId: '' } }).execute() +``` + +## Examples + +### Run revokeApiKey + +```typescript +const result = await db.mutation.revokeApiKey({ input: { keyId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/revoke-session.md b/.agents/skills/orm-auth/references/revoke-session.md new file mode 100644 index 000000000..4a3282392 --- /dev/null +++ b/.agents/skills/orm-auth/references/revoke-session.md @@ -0,0 +1,19 @@ +# revokeSession + + + +Execute the revokeSession mutation + +## Usage + +```typescript +db.mutation.revokeSession({ input: { sessionId: '' } }).execute() +``` + +## Examples + +### Run revokeSession + +```typescript +const result = await db.mutation.revokeSession({ input: { sessionId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/sign-in-cross-origin.md b/.agents/skills/orm-auth/references/sign-in-cross-origin.md new file mode 100644 index 000000000..f61dfa845 --- /dev/null +++ b/.agents/skills/orm-auth/references/sign-in-cross-origin.md @@ -0,0 +1,19 @@ +# signInCrossOrigin + + + +Execute the signInCrossOrigin mutation + +## Usage + +```typescript +db.mutation.signInCrossOrigin({ input: { token: '', credentialKind: '' } }).execute() +``` + +## Examples + +### Run signInCrossOrigin + +```typescript +const result = await db.mutation.signInCrossOrigin({ input: { token: '', credentialKind: '' } }).execute(); +``` diff --git a/.agents/skills/orm-auth/references/sign-in.md b/.agents/skills/orm-auth/references/sign-in.md index 0a147f027..60bab6986 100644 --- a/.agents/skills/orm-auth/references/sign-in.md +++ b/.agents/skills/orm-auth/references/sign-in.md @@ -7,7 +7,7 @@ Execute the signIn mutation ## Usage ```typescript -db.mutation.signIn({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute() +db.mutation.signIn({ input: '' }).execute() ``` ## Examples @@ -15,5 +15,5 @@ db.mutation.signIn({ input: { email: '', password: '', rememberM ### Run signIn ```typescript -const result = await db.mutation.signIn({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.signIn({ input: '' }).execute(); ``` diff --git a/.agents/skills/orm-auth/references/user-connected-account.md b/.agents/skills/orm-auth/references/user-connected-account.md new file mode 100644 index 000000000..107f38751 --- /dev/null +++ b/.agents/skills/orm-auth/references/user-connected-account.md @@ -0,0 +1,34 @@ +# userConnectedAccount + + + +ORM operations for UserConnectedAccount records + +## Usage + +```typescript +db.userConnectedAccount.findMany({ select: { id: true } }).execute() +db.userConnectedAccount.findOne({ id: '', select: { id: true } }).execute() +db.userConnectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute() +db.userConnectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute() +db.userConnectedAccount.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all userConnectedAccount records + +```typescript +const items = await db.userConnectedAccount.findMany({ + select: { id: true, ownerId: true } +}).execute(); +``` + +### Create a userConnectedAccount + +```typescript +const item = await db.userConnectedAccount.create({ + data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-public/SKILL.md b/.agents/skills/orm-public/SKILL.md index 188a1660d..7813ceccb 100644 --- a/.agents/skills/orm-public/SKILL.md +++ b/.agents/skills/orm-public/SKILL.md @@ -1,13 +1,13 @@ --- name: orm-public -description: ORM client for the public API — provides typed CRUD operations for 109 tables and 64 custom operations +description: ORM client for the public API — provides typed CRUD operations for 114 tables and 72 custom operations --- # orm-public -ORM client for the public API — provides typed CRUD operations for 109 tables and 64 custom operations +ORM client for the public API — provides typed CRUD operations for 114 tables and 72 custom operations ## Usage @@ -49,6 +49,7 @@ See the `references/` directory for detailed per-entity API documentation: - [table](references/table.md) - [check-constraint](references/check-constraint.md) - [field](references/field.md) +- [spatial-relation](references/spatial-relation.md) - [foreign-key-constraint](references/foreign-key-constraint.md) - [full-text-search](references/full-text-search.md) - [index](references/index.md) @@ -62,9 +63,9 @@ See the `references/` directory for detailed per-entity API documentation: - [view-grant](references/view-grant.md) - [view-rule](references/view-rule.md) - [embedding-chunk](references/embedding-chunk.md) -- [table-template-module](references/table-template-module.md) - [secure-table-provision](references/secure-table-provision.md) - [relation-provision](references/relation-provision.md) +- [session-secrets-module](references/session-secrets-module.md) - [schema-grant](references/schema-grant.md) - [default-privilege](references/default-privilege.md) - [enum](references/enum.md) @@ -102,6 +103,8 @@ See the `references/` directory for detailed per-entity API documentation: - [blueprint-template](references/blueprint-template.md) - [blueprint-construction](references/blueprint-construction.md) - [storage-module](references/storage-module.md) +- [entity-type-provision](references/entity-type-provision.md) +- [webauthn-credentials-module](references/webauthn-credentials-module.md) - [database-provision-module](references/database-provision-module.md) - [app-admin-grant](references/app-admin-grant.md) - [app-owner-grant](references/app-owner-grant.md) @@ -110,6 +113,7 @@ See the `references/` directory for detailed per-entity API documentation: - [org-member](references/org-member.md) - [org-admin-grant](references/org-admin-grant.md) - [org-owner-grant](references/org-owner-grant.md) +- [org-member-profile](references/org-member-profile.md) - [org-grant](references/org-grant.md) - [org-chart-edge](references/org-chart-edge.md) - [org-chart-edge-grant](references/org-chart-edge-grant.md) @@ -122,7 +126,6 @@ See the `references/` directory for detailed per-entity API documentation: - [email](references/email.md) - [phone-number](references/phone-number.md) - [crypto-address](references/crypto-address.md) -- [connected-account](references/connected-account.md) - [app-invite](references/app-invite.md) - [app-claimed-invite](references/app-claimed-invite.md) - [org-invite](references/org-invite.md) @@ -135,10 +138,12 @@ See the `references/` directory for detailed per-entity API documentation: - [migrate-file](references/migrate-file.md) - [app-limit-default](references/app-limit-default.md) - [org-limit-default](references/org-limit-default.md) -- [membership-type](references/membership-type.md) +- [devices-module](references/devices-module.md) +- [user-connected-account](references/user-connected-account.md) - [app-membership-default](references/app-membership-default.md) - [commit](references/commit.md) - [rate-limits-module](references/rate-limits-module.md) +- [membership-type](references/membership-type.md) - [org-membership-default](references/org-membership-default.md) - [rls-module](references/rls-module.md) - [sql-action](references/sql-action.md) @@ -147,12 +152,14 @@ See the `references/` directory for detailed per-entity API documentation: - [app-membership](references/app-membership.md) - [hierarchy-module](references/hierarchy-module.md) - [current-user-id](references/current-user-id.md) -- [current-ip-address](references/current-ip-address.md) - [current-user-agent](references/current-user-agent.md) +- [current-ip-address](references/current-ip-address.md) +- [require-step-up](references/require-step-up.md) - [app-permissions-get-padded-mask](references/app-permissions-get-padded-mask.md) - [org-permissions-get-padded-mask](references/org-permissions-get-padded-mask.md) - [steps-achieved](references/steps-achieved.md) - [rev-parse](references/rev-parse.md) +- [resolve-blueprint-field](references/resolve-blueprint-field.md) - [org-is-manager-of](references/org-is-manager-of.md) - [app-permissions-get-mask](references/app-permissions-get-mask.md) - [org-permissions-get-mask](references/org-permissions-get-mask.md) @@ -171,6 +178,9 @@ See the `references/` directory for detailed per-entity API documentation: - [accept-database-transfer](references/accept-database-transfer.md) - [cancel-database-transfer](references/cancel-database-transfer.md) - [reject-database-transfer](references/reject-database-transfer.md) +- [disconnect-account](references/disconnect-account.md) +- [revoke-api-key](references/revoke-api-key.md) +- [revoke-session](references/revoke-session.md) - [verify-password](references/verify-password.md) - [verify-totp](references/verify-totp.md) - [submit-app-invite-code](references/submit-app-invite-code.md) @@ -182,9 +192,12 @@ See the `references/` directory for detailed per-entity API documentation: - [freeze-objects](references/freeze-objects.md) - [init-empty-repo](references/init-empty-repo.md) - [construct-blueprint](references/construct-blueprint.md) +- [provision-new-user](references/provision-new-user.md) - [reset-password](references/reset-password.md) - [remove-node-at-path](references/remove-node-at-path.md) - [copy-template-to-blueprint](references/copy-template-to-blueprint.md) +- [create-api-key](references/create-api-key.md) +- [provision-spatial-relation](references/provision-spatial-relation.md) - [bootstrap-user](references/bootstrap-user.md) - [set-field-order](references/set-field-order.md) - [provision-unique-constraint](references/provision-unique-constraint.md) @@ -198,12 +211,12 @@ See the `references/` directory for detailed per-entity API documentation: - [set-and-commit](references/set-and-commit.md) - [provision-relation](references/provision-relation.md) - [apply-rls](references/apply-rls.md) -- [sign-in-one-time-token](references/sign-in-one-time-token.md) +- [sign-in-cross-origin](references/sign-in-cross-origin.md) - [create-user-database](references/create-user-database.md) - [extend-token-expires](references/extend-token-expires.md) -- [sign-in](references/sign-in.md) - [sign-up](references/sign-up.md) -- [one-time-token](references/one-time-token.md) +- [request-cross-origin-token](references/request-cross-origin-token.md) +- [sign-in](references/sign-in.md) - [provision-table](references/provision-table.md) - [send-verification-email](references/send-verification-email.md) - [forgot-password](references/forgot-password.md) diff --git a/.agents/skills/orm-public/references/app-membership.md b/.agents/skills/orm-public/references/app-membership.md index b71afa545..85ab2af03 100644 --- a/.agents/skills/orm-public/references/app-membership.md +++ b/.agents/skills/orm-public/references/app-membership.md @@ -9,7 +9,7 @@ Tracks membership records linking actors to entities with permission bitmasks, o ```typescript db.appMembership.findMany({ select: { id: true } }).execute() db.appMembership.findOne({ id: '', select: { id: true } }).execute() -db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute() +db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute() db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute() db.appMembership.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.appMembership.findMany({ ```typescript const item = await db.appMembership.create({ - data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, + data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-public/references/construct-blueprint.md b/.agents/skills/orm-public/references/construct-blueprint.md index f99df061b..5de8ca465 100644 --- a/.agents/skills/orm-public/references/construct-blueprint.md +++ b/.agents/skills/orm-public/references/construct-blueprint.md @@ -2,7 +2,7 @@ -Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. +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 diff --git a/.agents/skills/orm-public/references/create-api-key.md b/.agents/skills/orm-public/references/create-api-key.md new file mode 100644 index 000000000..3d2db3a70 --- /dev/null +++ b/.agents/skills/orm-public/references/create-api-key.md @@ -0,0 +1,19 @@ +# createApiKey + + + +Execute the createApiKey mutation + +## Usage + +```typescript +db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }).execute() +``` + +## Examples + +### Run createApiKey + +```typescript +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }).execute(); +``` diff --git a/.agents/skills/orm-public/references/devices-module.md b/.agents/skills/orm-public/references/devices-module.md new file mode 100644 index 000000000..b66b4c858 --- /dev/null +++ b/.agents/skills/orm-public/references/devices-module.md @@ -0,0 +1,34 @@ +# devicesModule + + + +ORM operations for DevicesModule records + +## Usage + +```typescript +db.devicesModule.findMany({ select: { id: true } }).execute() +db.devicesModule.findOne({ id: '', select: { id: true } }).execute() +db.devicesModule.create({ data: { databaseId: '', schemaId: '', userDevicesTableId: '', deviceSettingsTableId: '', userDevicesTable: '', deviceSettingsTable: '' }, select: { id: true } }).execute() +db.devicesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.devicesModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all devicesModule records + +```typescript +const items = await db.devicesModule.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a devicesModule + +```typescript +const item = await db.devicesModule.create({ + data: { databaseId: '', schemaId: '', userDevicesTableId: '', deviceSettingsTableId: '', userDevicesTable: '', deviceSettingsTable: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-public/references/disconnect-account.md b/.agents/skills/orm-public/references/disconnect-account.md new file mode 100644 index 000000000..f67b1ba94 --- /dev/null +++ b/.agents/skills/orm-public/references/disconnect-account.md @@ -0,0 +1,19 @@ +# disconnectAccount + + + +Execute the disconnectAccount mutation + +## Usage + +```typescript +db.mutation.disconnectAccount({ input: { accountId: '' } }).execute() +``` + +## Examples + +### Run disconnectAccount + +```typescript +const result = await db.mutation.disconnectAccount({ input: { accountId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-public/references/entity-type-provision.md b/.agents/skills/orm-public/references/entity-type-provision.md new file mode 100644 index 000000000..4e636630d --- /dev/null +++ b/.agents/skills/orm-public/references/entity-type-provision.md @@ -0,0 +1,41 @@ +# entityTypeProvision + + + +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 + +```typescript +db.entityTypeProvision.findMany({ select: { id: true } }).execute() +db.entityTypeProvision.findOne({ id: '', select: { id: true } }).execute() +db.entityTypeProvision.create({ data: { databaseId: '', name: '', prefix: '', description: '', parentEntity: '', tableName: '', isVisible: '', hasLimits: '', hasProfiles: '', hasLevels: '', skipEntityPolicies: '', tableProvision: '', outMembershipType: '', outEntityTableId: '', outEntityTableName: '', outInstalledModules: '' }, select: { id: true } }).execute() +db.entityTypeProvision.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.entityTypeProvision.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all entityTypeProvision records + +```typescript +const items = await db.entityTypeProvision.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a entityTypeProvision + +```typescript +const item = await db.entityTypeProvision.create({ + data: { databaseId: '', name: '', prefix: '', description: '', parentEntity: '', tableName: '', isVisible: '', hasLimits: '', hasProfiles: '', hasLevels: '', skipEntityPolicies: '', tableProvision: '', outMembershipType: '', outEntityTableId: '', outEntityTableName: '', outInstalledModules: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-public/references/membership-type.md b/.agents/skills/orm-public/references/membership-type.md index 7712dd2ca..d6d7e36a1 100644 --- a/.agents/skills/orm-public/references/membership-type.md +++ b/.agents/skills/orm-public/references/membership-type.md @@ -9,7 +9,7 @@ Defines the different scopes of membership (e.g. App Member, Organization Member ```typescript db.membershipType.findMany({ select: { id: true } }).execute() db.membershipType.findOne({ id: '', select: { id: true } }).execute() -db.membershipType.create({ data: { name: '', description: '', prefix: '' }, select: { id: true } }).execute() +db.membershipType.create({ data: { name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }, select: { id: true } }).execute() db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute() db.membershipType.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.membershipType.findMany({ ```typescript const item = await db.membershipType.create({ - data: { name: '', description: '', prefix: '' }, + data: { name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-public/references/memberships-module.md b/.agents/skills/orm-public/references/memberships-module.md index 3b0d83626..a41614976 100644 --- a/.agents/skills/orm-public/references/memberships-module.md +++ b/.agents/skills/orm-public/references/memberships-module.md @@ -9,7 +9,7 @@ ORM operations for MembershipsModule records ```typescript db.membershipsModule.findMany({ select: { id: true } }).execute() db.membershipsModule.findOne({ id: '', select: { id: true } }).execute() -db.membershipsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '' }, select: { id: true } }).execute() +db.membershipsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', memberProfilesTableId: '' }, select: { id: true } }).execute() db.membershipsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.membershipsModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.membershipsModule.findMany({ ```typescript const item = await db.membershipsModule.create({ - data: { databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '' }, + data: { databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', memberProfilesTableId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-public/references/org-member-profile.md b/.agents/skills/orm-public/references/org-member-profile.md new file mode 100644 index 000000000..09a8f167a --- /dev/null +++ b/.agents/skills/orm-public/references/org-member-profile.md @@ -0,0 +1,34 @@ +# orgMemberProfile + + + +Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + +## Usage + +```typescript +db.orgMemberProfile.findMany({ select: { id: true } }).execute() +db.orgMemberProfile.findOne({ id: '', select: { id: true } }).execute() +db.orgMemberProfile.create({ data: { membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }, select: { id: true } }).execute() +db.orgMemberProfile.update({ where: { id: '' }, data: { membershipId: '' }, select: { id: true } }).execute() +db.orgMemberProfile.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all orgMemberProfile records + +```typescript +const items = await db.orgMemberProfile.findMany({ + select: { id: true, membershipId: true } +}).execute(); +``` + +### Create a orgMemberProfile + +```typescript +const item = await db.orgMemberProfile.create({ + data: { membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-public/references/org-membership.md b/.agents/skills/orm-public/references/org-membership.md index b3af9e329..6407f09ee 100644 --- a/.agents/skills/orm-public/references/org-membership.md +++ b/.agents/skills/orm-public/references/org-membership.md @@ -9,7 +9,7 @@ Tracks membership records linking actors to entities with permission bitmasks, o ```typescript db.orgMembership.findMany({ select: { id: true } }).execute() db.orgMembership.findOne({ id: '', select: { id: true } }).execute() -db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }, select: { id: true } }).execute() +db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }, select: { id: true } }).execute() db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute() db.orgMembership.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.orgMembership.findMany({ ```typescript const item = await db.orgMembership.create({ - data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }, + data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-public/references/provision-new-user.md b/.agents/skills/orm-public/references/provision-new-user.md new file mode 100644 index 000000000..b5b29a133 --- /dev/null +++ b/.agents/skills/orm-public/references/provision-new-user.md @@ -0,0 +1,19 @@ +# provisionNewUser + + + +Execute the provisionNewUser mutation + +## Usage + +```typescript +db.mutation.provisionNewUser({ input: { email: '', password: '' } }).execute() +``` + +## Examples + +### Run provisionNewUser + +```typescript +const result = await db.mutation.provisionNewUser({ input: { email: '', password: '' } }).execute(); +``` diff --git a/.agents/skills/orm-public/references/provision-spatial-relation.md b/.agents/skills/orm-public/references/provision-spatial-relation.md new file mode 100644 index 000000000..78407861b --- /dev/null +++ b/.agents/skills/orm-public/references/provision-spatial-relation.md @@ -0,0 +1,19 @@ +# provisionSpatialRelation + + + +Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + +## Usage + +```typescript +db.mutation.provisionSpatialRelation({ input: '' }).execute() +``` + +## Examples + +### Run provisionSpatialRelation + +```typescript +const result = await db.mutation.provisionSpatialRelation({ input: '' }).execute(); +``` diff --git a/.agents/skills/orm-public/references/request-cross-origin-token.md b/.agents/skills/orm-public/references/request-cross-origin-token.md new file mode 100644 index 000000000..10572d142 --- /dev/null +++ b/.agents/skills/orm-public/references/request-cross-origin-token.md @@ -0,0 +1,19 @@ +# requestCrossOriginToken + + + +Execute the requestCrossOriginToken mutation + +## Usage + +```typescript +db.mutation.requestCrossOriginToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute() +``` + +## Examples + +### Run requestCrossOriginToken + +```typescript +const result = await db.mutation.requestCrossOriginToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +``` diff --git a/.agents/skills/orm-public/references/require-step-up.md b/.agents/skills/orm-public/references/require-step-up.md new file mode 100644 index 000000000..a0838149e --- /dev/null +++ b/.agents/skills/orm-public/references/require-step-up.md @@ -0,0 +1,19 @@ +# requireStepUp + + + +Execute the requireStepUp query + +## Usage + +```typescript +db.query.requireStepUp({ stepUpType: '' }).execute() +``` + +## Examples + +### Run requireStepUp + +```typescript +const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); +``` diff --git a/.agents/skills/orm-public/references/resolve-blueprint-field.md b/.agents/skills/orm-public/references/resolve-blueprint-field.md new file mode 100644 index 000000000..55ae9fa56 --- /dev/null +++ b/.agents/skills/orm-public/references/resolve-blueprint-field.md @@ -0,0 +1,19 @@ +# resolveBlueprintField + + + +Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + +## Usage + +```typescript +db.query.resolveBlueprintField({ databaseId: '', tableId: '', fieldName: '' }).execute() +``` + +## Examples + +### Run resolveBlueprintField + +```typescript +const result = await db.query.resolveBlueprintField({ databaseId: '', tableId: '', fieldName: '' }).execute(); +``` diff --git a/.agents/skills/orm-public/references/revoke-api-key.md b/.agents/skills/orm-public/references/revoke-api-key.md new file mode 100644 index 000000000..08dd4669a --- /dev/null +++ b/.agents/skills/orm-public/references/revoke-api-key.md @@ -0,0 +1,19 @@ +# revokeApiKey + + + +Execute the revokeApiKey mutation + +## Usage + +```typescript +db.mutation.revokeApiKey({ input: { keyId: '' } }).execute() +``` + +## Examples + +### Run revokeApiKey + +```typescript +const result = await db.mutation.revokeApiKey({ input: { keyId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-public/references/revoke-session.md b/.agents/skills/orm-public/references/revoke-session.md new file mode 100644 index 000000000..4a3282392 --- /dev/null +++ b/.agents/skills/orm-public/references/revoke-session.md @@ -0,0 +1,19 @@ +# revokeSession + + + +Execute the revokeSession mutation + +## Usage + +```typescript +db.mutation.revokeSession({ input: { sessionId: '' } }).execute() +``` + +## Examples + +### Run revokeSession + +```typescript +const result = await db.mutation.revokeSession({ input: { sessionId: '' } }).execute(); +``` diff --git a/.agents/skills/orm-public/references/session-secrets-module.md b/.agents/skills/orm-public/references/session-secrets-module.md new file mode 100644 index 000000000..996da9a44 --- /dev/null +++ b/.agents/skills/orm-public/references/session-secrets-module.md @@ -0,0 +1,34 @@ +# sessionSecretsModule + + + +Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + +## Usage + +```typescript +db.sessionSecretsModule.findMany({ select: { id: true } }).execute() +db.sessionSecretsModule.findOne({ id: '', select: { id: true } }).execute() +db.sessionSecretsModule.create({ data: { databaseId: '', schemaId: '', tableId: '', tableName: '', sessionsTableId: '' }, select: { id: true } }).execute() +db.sessionSecretsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.sessionSecretsModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all sessionSecretsModule records + +```typescript +const items = await db.sessionSecretsModule.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a sessionSecretsModule + +```typescript +const item = await db.sessionSecretsModule.create({ + data: { databaseId: '', schemaId: '', tableId: '', tableName: '', sessionsTableId: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-public/references/sign-in-cross-origin.md b/.agents/skills/orm-public/references/sign-in-cross-origin.md new file mode 100644 index 000000000..f61dfa845 --- /dev/null +++ b/.agents/skills/orm-public/references/sign-in-cross-origin.md @@ -0,0 +1,19 @@ +# signInCrossOrigin + + + +Execute the signInCrossOrigin mutation + +## Usage + +```typescript +db.mutation.signInCrossOrigin({ input: { token: '', credentialKind: '' } }).execute() +``` + +## Examples + +### Run signInCrossOrigin + +```typescript +const result = await db.mutation.signInCrossOrigin({ input: { token: '', credentialKind: '' } }).execute(); +``` diff --git a/.agents/skills/orm-public/references/sign-in.md b/.agents/skills/orm-public/references/sign-in.md index 0a147f027..60bab6986 100644 --- a/.agents/skills/orm-public/references/sign-in.md +++ b/.agents/skills/orm-public/references/sign-in.md @@ -7,7 +7,7 @@ Execute the signIn mutation ## Usage ```typescript -db.mutation.signIn({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute() +db.mutation.signIn({ input: '' }).execute() ``` ## Examples @@ -15,5 +15,5 @@ db.mutation.signIn({ input: { email: '', password: '', rememberM ### Run signIn ```typescript -const result = await db.mutation.signIn({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.signIn({ input: '' }).execute(); ``` diff --git a/.agents/skills/orm-public/references/spatial-relation.md b/.agents/skills/orm-public/references/spatial-relation.md new file mode 100644 index 000000000..c0094eb82 --- /dev/null +++ b/.agents/skills/orm-public/references/spatial-relation.md @@ -0,0 +1,34 @@ +# spatialRelation + + + +ORM operations for SpatialRelation records + +## Usage + +```typescript +db.spatialRelation.findMany({ select: { id: true } }).execute() +db.spatialRelation.findOne({ id: '', select: { id: true } }).execute() +db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', module: '', scope: '', tags: '' }, select: { id: true } }).execute() +db.spatialRelation.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.spatialRelation.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all spatialRelation records + +```typescript +const items = await db.spatialRelation.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a spatialRelation + +```typescript +const item = await db.spatialRelation.create({ + data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', module: '', scope: '', tags: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-public/references/user-auth-module.md b/.agents/skills/orm-public/references/user-auth-module.md index 4c5de4e3a..c4d91dae9 100644 --- a/.agents/skills/orm-public/references/user-auth-module.md +++ b/.agents/skills/orm-public/references/user-auth-module.md @@ -9,7 +9,7 @@ ORM operations for UserAuthModule records ```typescript db.userAuthModule.findMany({ select: { id: true } }).execute() db.userAuthModule.findOne({ id: '', select: { id: true } }).execute() -db.userAuthModule.create({ data: { databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInOneTimeTokenFunction: '', oneTimeTokenFunction: '', extendTokenExpires: '' }, select: { id: true } }).execute() +db.userAuthModule.create({ data: { databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInCrossOriginFunction: '', requestCrossOriginTokenFunction: '', extendTokenExpires: '' }, select: { id: true } }).execute() db.userAuthModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() db.userAuthModule.delete({ where: { id: '' } }).execute() ``` @@ -28,7 +28,7 @@ const items = await db.userAuthModule.findMany({ ```typescript const item = await db.userAuthModule.create({ - data: { databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInOneTimeTokenFunction: '', oneTimeTokenFunction: '', extendTokenExpires: '' }, + data: { databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInCrossOriginFunction: '', requestCrossOriginTokenFunction: '', extendTokenExpires: '' }, select: { id: true } }).execute(); ``` diff --git a/.agents/skills/orm-public/references/user-connected-account.md b/.agents/skills/orm-public/references/user-connected-account.md new file mode 100644 index 000000000..107f38751 --- /dev/null +++ b/.agents/skills/orm-public/references/user-connected-account.md @@ -0,0 +1,34 @@ +# userConnectedAccount + + + +ORM operations for UserConnectedAccount records + +## Usage + +```typescript +db.userConnectedAccount.findMany({ select: { id: true } }).execute() +db.userConnectedAccount.findOne({ id: '', select: { id: true } }).execute() +db.userConnectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute() +db.userConnectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute() +db.userConnectedAccount.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all userConnectedAccount records + +```typescript +const items = await db.userConnectedAccount.findMany({ + select: { id: true, ownerId: true } +}).execute(); +``` + +### Create a userConnectedAccount + +```typescript +const item = await db.userConnectedAccount.create({ + data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, + select: { id: true } +}).execute(); +``` diff --git a/.agents/skills/orm-public/references/webauthn-credentials-module.md b/.agents/skills/orm-public/references/webauthn-credentials-module.md new file mode 100644 index 000000000..d3615b65b --- /dev/null +++ b/.agents/skills/orm-public/references/webauthn-credentials-module.md @@ -0,0 +1,34 @@ +# webauthnCredentialsModule + + + +Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + +## Usage + +```typescript +db.webauthnCredentialsModule.findMany({ select: { id: true } }).execute() +db.webauthnCredentialsModule.findOne({ id: '', select: { id: true } }).execute() +db.webauthnCredentialsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '' }, select: { id: true } }).execute() +db.webauthnCredentialsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute() +db.webauthnCredentialsModule.delete({ where: { id: '' } }).execute() +``` + +## Examples + +### List all webauthnCredentialsModule records + +```typescript +const items = await db.webauthnCredentialsModule.findMany({ + select: { id: true, databaseId: true } +}).execute(); +``` + +### Create a webauthnCredentialsModule + +```typescript +const item = await db.webauthnCredentialsModule.create({ + data: { databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '' }, + select: { id: true } +}).execute(); +``` diff --git a/sdk/constructive-cli/src/admin/README.md b/sdk/constructive-cli/src/admin/README.md index fc0a8999b..0715ed7e5 100644 --- a/sdk/constructive-cli/src/admin/README.md +++ b/sdk/constructive-cli/src/admin/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 32 +- **Tables:** 33 - **Custom queries:** 11 - **Custom mutations:** 5 diff --git a/sdk/constructive-cli/src/admin/cli/README.md b/sdk/constructive-cli/src/admin/cli/README.md index ec8617219..6240b4ef6 100644 --- a/sdk/constructive-cli/src/admin/cli/README.md +++ b/sdk/constructive-cli/src/admin/cli/README.md @@ -40,24 +40,25 @@ csdk auth set-token | `org-limit-default` | orgLimitDefault CRUD operations | | `org-admin-grant` | orgAdminGrant CRUD operations | | `org-owner-grant` | orgOwnerGrant CRUD operations | -| `membership-type` | membershipType CRUD operations | | `app-limit` | appLimit CRUD operations | | `app-achievement` | appAchievement CRUD operations | | `app-step` | appStep CRUD operations | | `app-claimed-invite` | appClaimedInvite CRUD operations | | `org-chart-edge-grant` | orgChartEdgeGrant CRUD operations | | `org-limit` | orgLimit CRUD operations | +| `membership-type` | membershipType CRUD operations | | `app-grant` | appGrant CRUD operations | | `app-membership-default` | appMembershipDefault CRUD operations | | `org-claimed-invite` | orgClaimedInvite CRUD operations | | `org-grant` | orgGrant CRUD operations | | `org-chart-edge` | orgChartEdge CRUD operations | | `org-membership-default` | orgMembershipDefault CRUD operations | +| `org-member-profile` | orgMemberProfile CRUD operations | | `app-level` | appLevel CRUD operations | | `app-invite` | appInvite CRUD operations | +| `org-invite` | orgInvite CRUD operations | | `app-membership` | appMembership CRUD operations | | `org-membership` | orgMembership CRUD operations | -| `org-invite` | orgInvite CRUD operations | | `app-permissions-get-padded-mask` | appPermissionsGetPaddedMask | | `org-permissions-get-padded-mask` | orgPermissionsGetPaddedMask | | `org-is-manager-of` | orgIsManagerOf | @@ -476,30 +477,6 @@ CRUD operations for OrgOwnerGrant records. **Required create fields:** `actorId`, `entityId` **Optional create fields (backend defaults):** `isGrant`, `grantorId` -### `membership-type` - -CRUD operations for MembershipType records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all membershipType records | -| `find-first` | Find first matching membershipType record | -| `get` | Get a membershipType by id | -| `create` | Create a new membershipType | -| `update` | Update an existing membershipType | -| `delete` | Delete a membershipType | - -**Fields:** - -| Field | Type | -|-------|------| -| `id` | Int | -| `name` | String | -| `description` | String | -| `prefix` | String | - -**Required create fields:** `name`, `description`, `prefix` - ### `app-limit` CRUD operations for AppLimit records. @@ -663,6 +640,33 @@ CRUD operations for OrgLimit records. **Required create fields:** `actorId`, `entityId` **Optional create fields (backend defaults):** `name`, `num`, `max` +### `membership-type` + +CRUD operations for MembershipType records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all membershipType records | +| `find-first` | Find first matching membershipType record | +| `get` | Get a membershipType by id | +| `create` | Create a new membershipType | +| `update` | Update an existing membershipType | +| `delete` | Delete a membershipType | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | Int | +| `name` | String | +| `description` | String | +| `prefix` | String | +| `parentMembershipType` | Int | +| `hasUsersTableEntry` | Boolean | + +**Required create fields:** `name`, `description`, `prefix` +**Optional create fields (backend defaults):** `parentMembershipType`, `hasUsersTableEntry` + ### `app-grant` CRUD operations for AppGrant records. @@ -834,6 +838,38 @@ CRUD operations for OrgMembershipDefault records. **Required create fields:** `entityId` **Optional create fields (backend defaults):** `createdBy`, `updatedBy`, `isApproved`, `deleteMemberCascadeGroups`, `createGroupsCascadeMembers` +### `org-member-profile` + +CRUD operations for OrgMemberProfile records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all orgMemberProfile records | +| `find-first` | Find first matching orgMemberProfile record | +| `get` | Get a orgMemberProfile by id | +| `create` | Create a new orgMemberProfile | +| `update` | Update an existing orgMemberProfile | +| `delete` | Delete a orgMemberProfile | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | +| `membershipId` | UUID | +| `entityId` | UUID | +| `actorId` | UUID | +| `displayName` | String | +| `email` | String | +| `title` | String | +| `bio` | String | +| `profilePicture` | Image | + +**Required create fields:** `membershipId`, `entityId`, `actorId` +**Optional create fields (backend defaults):** `displayName`, `email`, `title`, `bio`, `profilePicture` + ### `app-level` CRUD operations for AppLevel records. @@ -894,6 +930,41 @@ CRUD operations for AppInvite records. **Optional create fields (backend defaults):** `email`, `senderId`, `inviteToken`, `inviteValid`, `inviteLimit`, `inviteCount`, `multiple`, `data`, `expiresAt` +### `org-invite` + +CRUD operations for OrgInvite records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all orgInvite records | +| `find-first` | Find first matching orgInvite record | +| `get` | Get a orgInvite by id | +| `create` | Create a new orgInvite | +| `update` | Update an existing orgInvite | +| `delete` | Delete a orgInvite | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `email` | Email | +| `senderId` | UUID | +| `receiverId` | UUID | +| `inviteToken` | String | +| `inviteValid` | Boolean | +| `inviteLimit` | Int | +| `inviteCount` | Int | +| `multiple` | Boolean | +| `data` | JSON | +| `expiresAt` | Datetime | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | +| `entityId` | UUID | + +**Required create fields:** `entityId` +**Optional create fields (backend defaults):** `email`, `senderId`, `receiverId`, `inviteToken`, `inviteValid`, `inviteLimit`, `inviteCount`, `multiple`, `data`, `expiresAt` + ### `app-membership` CRUD operations for AppMembership records. @@ -921,6 +992,7 @@ CRUD operations for AppMembership records. | `isDisabled` | Boolean | | `isVerified` | Boolean | | `isActive` | Boolean | +| `isExternal` | Boolean | | `isOwner` | Boolean | | `isAdmin` | Boolean | | `permissions` | BitString | @@ -929,7 +1001,7 @@ CRUD operations for AppMembership records. | `profileId` | UUID | **Required create fields:** `actorId` -**Optional create fields (backend defaults):** `createdBy`, `updatedBy`, `isApproved`, `isBanned`, `isDisabled`, `isVerified`, `isActive`, `isOwner`, `isAdmin`, `permissions`, `granted`, `profileId` +**Optional create fields (backend defaults):** `createdBy`, `updatedBy`, `isApproved`, `isBanned`, `isDisabled`, `isVerified`, `isActive`, `isExternal`, `isOwner`, `isAdmin`, `permissions`, `granted`, `profileId` ### `org-membership` @@ -957,51 +1029,18 @@ CRUD operations for OrgMembership records. | `isBanned` | Boolean | | `isDisabled` | Boolean | | `isActive` | Boolean | +| `isExternal` | Boolean | | `isOwner` | Boolean | | `isAdmin` | Boolean | | `permissions` | BitString | | `granted` | BitString | | `actorId` | UUID | | `entityId` | UUID | +| `isReadOnly` | Boolean | | `profileId` | UUID | **Required create fields:** `actorId`, `entityId` -**Optional create fields (backend defaults):** `createdBy`, `updatedBy`, `isApproved`, `isBanned`, `isDisabled`, `isActive`, `isOwner`, `isAdmin`, `permissions`, `granted`, `profileId` - -### `org-invite` - -CRUD operations for OrgInvite records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all orgInvite records | -| `find-first` | Find first matching orgInvite record | -| `get` | Get a orgInvite by id | -| `create` | Create a new orgInvite | -| `update` | Update an existing orgInvite | -| `delete` | Delete a orgInvite | - -**Fields:** - -| Field | Type | -|-------|------| -| `id` | UUID | -| `email` | Email | -| `senderId` | UUID | -| `receiverId` | UUID | -| `inviteToken` | String | -| `inviteValid` | Boolean | -| `inviteLimit` | Int | -| `inviteCount` | Int | -| `multiple` | Boolean | -| `data` | JSON | -| `expiresAt` | Datetime | -| `createdAt` | Datetime | -| `updatedAt` | Datetime | -| `entityId` | UUID | - -**Required create fields:** `entityId` -**Optional create fields (backend defaults):** `email`, `senderId`, `receiverId`, `inviteToken`, `inviteValid`, `inviteLimit`, `inviteCount`, `multiple`, `data`, `expiresAt` +**Optional create fields (backend defaults):** `createdBy`, `updatedBy`, `isApproved`, `isBanned`, `isDisabled`, `isActive`, `isExternal`, `isOwner`, `isAdmin`, `permissions`, `granted`, `isReadOnly`, `profileId` ## Custom Operations diff --git a/sdk/constructive-cli/src/admin/cli/commands.ts b/sdk/constructive-cli/src/admin/cli/commands.ts index 59925517d..08078c481 100644 --- a/sdk/constructive-cli/src/admin/cli/commands.ts +++ b/sdk/constructive-cli/src/admin/cli/commands.ts @@ -20,24 +20,25 @@ import appLimitDefaultCmd from './commands/app-limit-default'; import orgLimitDefaultCmd from './commands/org-limit-default'; import orgAdminGrantCmd from './commands/org-admin-grant'; import orgOwnerGrantCmd from './commands/org-owner-grant'; -import membershipTypeCmd from './commands/membership-type'; import appLimitCmd from './commands/app-limit'; import appAchievementCmd from './commands/app-achievement'; import appStepCmd from './commands/app-step'; import appClaimedInviteCmd from './commands/app-claimed-invite'; import orgChartEdgeGrantCmd from './commands/org-chart-edge-grant'; import orgLimitCmd from './commands/org-limit'; +import membershipTypeCmd from './commands/membership-type'; import appGrantCmd from './commands/app-grant'; import appMembershipDefaultCmd from './commands/app-membership-default'; import orgClaimedInviteCmd from './commands/org-claimed-invite'; import orgGrantCmd from './commands/org-grant'; import orgChartEdgeCmd from './commands/org-chart-edge'; import orgMembershipDefaultCmd from './commands/org-membership-default'; +import orgMemberProfileCmd from './commands/org-member-profile'; import appLevelCmd from './commands/app-level'; import appInviteCmd from './commands/app-invite'; +import orgInviteCmd from './commands/org-invite'; import appMembershipCmd from './commands/app-membership'; import orgMembershipCmd from './commands/org-membership'; -import orgInviteCmd from './commands/org-invite'; import appPermissionsGetPaddedMaskCmd from './commands/app-permissions-get-padded-mask'; import orgPermissionsGetPaddedMaskCmd from './commands/org-permissions-get-padded-mask'; import orgIsManagerOfCmd from './commands/org-is-manager-of'; @@ -78,24 +79,25 @@ const createCommandMap: () => Record< 'org-limit-default': orgLimitDefaultCmd, 'org-admin-grant': orgAdminGrantCmd, 'org-owner-grant': orgOwnerGrantCmd, - 'membership-type': membershipTypeCmd, 'app-limit': appLimitCmd, 'app-achievement': appAchievementCmd, 'app-step': appStepCmd, 'app-claimed-invite': appClaimedInviteCmd, 'org-chart-edge-grant': orgChartEdgeGrantCmd, 'org-limit': orgLimitCmd, + 'membership-type': membershipTypeCmd, 'app-grant': appGrantCmd, 'app-membership-default': appMembershipDefaultCmd, 'org-claimed-invite': orgClaimedInviteCmd, 'org-grant': orgGrantCmd, 'org-chart-edge': orgChartEdgeCmd, 'org-membership-default': orgMembershipDefaultCmd, + 'org-member-profile': orgMemberProfileCmd, 'app-level': appLevelCmd, 'app-invite': appInviteCmd, + 'org-invite': orgInviteCmd, 'app-membership': appMembershipCmd, 'org-membership': orgMembershipCmd, - 'org-invite': orgInviteCmd, 'app-permissions-get-padded-mask': appPermissionsGetPaddedMaskCmd, 'org-permissions-get-padded-mask': orgPermissionsGetPaddedMaskCmd, 'org-is-manager-of': orgIsManagerOfCmd, @@ -114,7 +116,7 @@ const createCommandMap: () => Record< 'provision-bucket': provisionBucketCmd, }); const usage = - "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n org-member orgMember CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n membership-type membershipType CRUD operations\n app-limit appLimit CRUD operations\n app-achievement appAchievement CRUD operations\n app-step appStep CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-limit orgLimit CRUD operations\n app-grant appGrant CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n app-level appLevel CRUD operations\n app-invite appInvite CRUD operations\n app-membership appMembership CRUD operations\n org-membership orgMembership CRUD operations\n org-invite orgInvite CRUD operations\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n steps-achieved stepsAchieved\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n submit-app-invite-code submitAppInviteCode\n submit-org-invite-code submitOrgInviteCode\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n confirm-upload Confirm that a file has been uploaded to S3.\nVerifies the object exists in S3, checks content-type,\nand transitions the file status from 'pending' to 'ready'.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n"; + "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n org-member orgMember CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n app-limit appLimit CRUD operations\n app-achievement appAchievement CRUD operations\n app-step appStep CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-limit orgLimit CRUD operations\n membership-type membershipType CRUD operations\n app-grant appGrant CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n org-member-profile orgMemberProfile CRUD operations\n app-level appLevel CRUD operations\n app-invite appInvite CRUD operations\n org-invite orgInvite CRUD operations\n app-membership appMembership CRUD operations\n org-membership orgMembership CRUD operations\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n steps-achieved stepsAchieved\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n submit-app-invite-code submitAppInviteCode\n submit-org-invite-code submitOrgInviteCode\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n confirm-upload Confirm that a file has been uploaded to S3.\nVerifies the object exists in S3, checks content-type,\nand transitions the file status from 'pending' to 'ready'.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n"; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/admin/cli/commands/app-membership.ts b/sdk/constructive-cli/src/admin/cli/commands/app-membership.ts index d463fd934..ae7106f87 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/app-membership.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/app-membership.ts @@ -26,6 +26,7 @@ const fieldSchema: FieldSchema = { isDisabled: 'boolean', isVerified: 'boolean', isActive: 'boolean', + isExternal: 'boolean', isOwner: 'boolean', isAdmin: 'boolean', permissions: 'string', @@ -94,6 +95,7 @@ async function handleList(argv: Partial>, _prompter: Inq isDisabled: true, isVerified: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, @@ -130,6 +132,7 @@ async function handleFindFirst(argv: Partial>, _prompter isDisabled: true, isVerified: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, @@ -178,6 +181,7 @@ async function handleGet(argv: Partial>, prompter: Inqui isDisabled: true, isVerified: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, @@ -248,6 +252,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'boolean', + name: 'isExternal', + message: 'isExternal', + required: false, + skipPrompt: true, + }, { type: 'boolean', name: 'isOwner', @@ -306,6 +317,7 @@ async function handleCreate(argv: Partial>, prompter: In isDisabled: cleanedData.isDisabled, isVerified: cleanedData.isVerified, isActive: cleanedData.isActive, + isExternal: cleanedData.isExternal, isOwner: cleanedData.isOwner, isAdmin: cleanedData.isAdmin, permissions: cleanedData.permissions, @@ -324,6 +336,7 @@ async function handleCreate(argv: Partial>, prompter: In isDisabled: true, isVerified: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, @@ -400,6 +413,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'boolean', + name: 'isExternal', + message: 'isExternal', + required: false, + skipPrompt: true, + }, { type: 'boolean', name: 'isOwner', @@ -458,6 +478,7 @@ async function handleUpdate(argv: Partial>, prompter: In isDisabled: cleanedData.isDisabled, isVerified: cleanedData.isVerified, isActive: cleanedData.isActive, + isExternal: cleanedData.isExternal, isOwner: cleanedData.isOwner, isAdmin: cleanedData.isAdmin, permissions: cleanedData.permissions, @@ -476,6 +497,7 @@ async function handleUpdate(argv: Partial>, prompter: In isDisabled: true, isVerified: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, diff --git a/sdk/constructive-cli/src/admin/cli/commands/membership-type.ts b/sdk/constructive-cli/src/admin/cli/commands/membership-type.ts index 91dc29236..cc1ba7915 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/membership-type.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/membership-type.ts @@ -20,6 +20,8 @@ const fieldSchema: FieldSchema = { name: 'string', description: 'string', prefix: 'string', + parentMembershipType: 'int', + hasUsersTableEntry: 'boolean', }; const usage = '\nmembership-type \n\nCommands:\n list List membershipType records\n find-first Find first matching membershipType record\n get Get a membershipType by ID\n create Create a new membershipType\n update Update an existing membershipType\n delete Delete a membershipType\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; @@ -76,6 +78,8 @@ async function handleList(argv: Partial>, _prompter: Inq name: true, description: true, prefix: true, + parentMembershipType: true, + hasUsersTableEntry: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs & { @@ -100,6 +104,8 @@ async function handleFindFirst(argv: Partial>, _prompter name: true, description: true, prefix: true, + parentMembershipType: true, + hasUsersTableEntry: true, }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs & { @@ -136,6 +142,8 @@ async function handleGet(argv: Partial>, prompter: Inqui name: true, description: true, prefix: true, + parentMembershipType: true, + hasUsersTableEntry: true, }, }) .execute(); @@ -169,6 +177,20 @@ async function handleCreate(argv: Partial>, prompter: In message: 'prefix', required: true, }, + { + type: 'text', + name: 'parentMembershipType', + message: 'parentMembershipType', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'hasUsersTableEntry', + message: 'hasUsersTableEntry', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined( @@ -182,12 +204,16 @@ async function handleCreate(argv: Partial>, prompter: In name: cleanedData.name, description: cleanedData.description, prefix: cleanedData.prefix, + parentMembershipType: cleanedData.parentMembershipType, + hasUsersTableEntry: cleanedData.hasUsersTableEntry, }, select: { id: true, name: true, description: true, prefix: true, + parentMembershipType: true, + hasUsersTableEntry: true, }, }) .execute(); @@ -227,6 +253,20 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'prefix', required: false, }, + { + type: 'text', + name: 'parentMembershipType', + message: 'parentMembershipType', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'hasUsersTableEntry', + message: 'hasUsersTableEntry', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as MembershipTypePatch; @@ -240,12 +280,16 @@ async function handleUpdate(argv: Partial>, prompter: In name: cleanedData.name, description: cleanedData.description, prefix: cleanedData.prefix, + parentMembershipType: cleanedData.parentMembershipType, + hasUsersTableEntry: cleanedData.hasUsersTableEntry, }, select: { id: true, name: true, description: true, prefix: true, + parentMembershipType: true, + hasUsersTableEntry: true, }, }) .execute(); diff --git a/sdk/constructive-cli/src/public/cli/commands/connected-account.ts b/sdk/constructive-cli/src/admin/cli/commands/org-member-profile.ts similarity index 55% rename from sdk/constructive-cli/src/public/cli/commands/connected-account.ts rename to sdk/constructive-cli/src/admin/cli/commands/org-member-profile.ts index 5522a3457..eddfe0d5f 100644 --- a/sdk/constructive-cli/src/public/cli/commands/connected-account.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-member-profile.ts @@ -1,5 +1,5 @@ /** - * CLI commands for ConnectedAccount + * CLI commands for OrgMemberProfile * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -8,25 +8,28 @@ import { getClient } from '../executor'; import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; import type { FieldSchema } from '../utils'; import type { - CreateConnectedAccountInput, - ConnectedAccountPatch, - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy, + CreateOrgMemberProfileInput, + OrgMemberProfilePatch, + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, } from '../../orm/input-types'; import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; const fieldSchema: FieldSchema = { id: 'uuid', - ownerId: 'uuid', - service: 'string', - identifier: 'string', - details: 'json', - isVerified: 'boolean', createdAt: 'string', updatedAt: 'string', + membershipId: 'uuid', + entityId: 'uuid', + actorId: 'uuid', + displayName: 'string', + email: 'string', + title: 'string', + bio: 'string', + profilePicture: 'string', }; const usage = - '\nconnected-account \n\nCommands:\n list List connectedAccount records\n find-first Find first matching connectedAccount record\n get Get a connectedAccount by ID\n create Create a new connectedAccount\n update Update an existing connectedAccount\n delete Delete a connectedAccount\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\norg-member-profile \n\nCommands:\n list List orgMemberProfile records\n find-first Find first matching orgMemberProfile record\n get Get a orgMemberProfile by ID\n create Create a new orgMemberProfile\n update Update an existing orgMemberProfile\n delete Delete a orgMemberProfile\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -77,21 +80,24 @@ async function handleList(argv: Partial>, _prompter: Inq try { const defaultSelect = { id: true, - ownerId: true, - service: true, - identifier: true, - details: true, - isVerified: true, createdAt: true, updatedAt: true, + membershipId: true, + entityId: true, + actorId: true, + displayName: true, + email: true, + title: true, + bio: true, + profilePicture: true, }; const findManyArgs = parseFindManyArgs< - FindManyArgs & { - select: ConnectedAccountSelect; + FindManyArgs & { + select: OrgMemberProfileSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.connectedAccount.findMany(findManyArgs).execute(); + const result = await client.orgMemberProfile.findMany(findManyArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to list records.'); @@ -105,21 +111,24 @@ async function handleFindFirst(argv: Partial>, _prompter try { const defaultSelect = { id: true, - ownerId: true, - service: true, - identifier: true, - details: true, - isVerified: true, createdAt: true, updatedAt: true, + membershipId: true, + entityId: true, + actorId: true, + displayName: true, + email: true, + title: true, + bio: true, + profilePicture: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { - select: ConnectedAccountSelect; + FindFirstArgs & { + select: OrgMemberProfileSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.connectedAccount.findFirst(findFirstArgs).execute(); + const result = await client.orgMemberProfile.findFirst(findFirstArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to find record.'); @@ -140,18 +149,21 @@ async function handleGet(argv: Partial>, prompter: Inqui }, ]); const client = getClient(); - const result = await client.connectedAccount + const result = await client.orgMemberProfile .findOne({ id: answers.id as string, select: { id: true, - ownerId: true, - service: true, - identifier: true, - details: true, - isVerified: true, createdAt: true, updatedAt: true, + membershipId: true, + entityId: true, + actorId: true, + displayName: true, + email: true, + title: true, + bio: true, + profilePicture: true, }, }) .execute(); @@ -169,33 +181,54 @@ async function handleCreate(argv: Partial>, prompter: In const rawAnswers = await prompter.prompt(argv, [ { type: 'text', - name: 'ownerId', - message: 'ownerId', - required: false, - skipPrompt: true, + name: 'membershipId', + message: 'membershipId', + required: true, }, { type: 'text', - name: 'service', - message: 'service', + name: 'entityId', + message: 'entityId', required: true, }, { type: 'text', - name: 'identifier', - message: 'identifier', + name: 'actorId', + message: 'actorId', required: true, }, { - type: 'json', - name: 'details', - message: 'details', - required: true, + type: 'text', + name: 'displayName', + message: 'displayName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'email', + message: 'email', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'title', + message: 'title', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'bio', + message: 'bio', + required: false, + skipPrompt: true, }, { - type: 'boolean', - name: 'isVerified', - message: 'isVerified', + type: 'text', + name: 'profilePicture', + message: 'profilePicture', required: false, skipPrompt: true, }, @@ -204,26 +237,32 @@ async function handleCreate(argv: Partial>, prompter: In const cleanedData = stripUndefined( answers, fieldSchema - ) as CreateConnectedAccountInput['connectedAccount']; + ) as CreateOrgMemberProfileInput['orgMemberProfile']; const client = getClient(); - const result = await client.connectedAccount + const result = await client.orgMemberProfile .create({ data: { - ownerId: cleanedData.ownerId, - service: cleanedData.service, - identifier: cleanedData.identifier, - details: cleanedData.details, - isVerified: cleanedData.isVerified, + membershipId: cleanedData.membershipId, + entityId: cleanedData.entityId, + actorId: cleanedData.actorId, + displayName: cleanedData.displayName, + email: cleanedData.email, + title: cleanedData.title, + bio: cleanedData.bio, + profilePicture: cleanedData.profilePicture, }, select: { id: true, - ownerId: true, - service: true, - identifier: true, - details: true, - isVerified: true, createdAt: true, updatedAt: true, + membershipId: true, + entityId: true, + actorId: true, + displayName: true, + email: true, + title: true, + bio: true, + profilePicture: true, }, }) .execute(); @@ -247,61 +286,88 @@ async function handleUpdate(argv: Partial>, prompter: In }, { type: 'text', - name: 'ownerId', - message: 'ownerId', + name: 'membershipId', + message: 'membershipId', + required: false, + }, + { + type: 'text', + name: 'entityId', + message: 'entityId', + required: false, + }, + { + type: 'text', + name: 'actorId', + message: 'actorId', + required: false, + }, + { + type: 'text', + name: 'displayName', + message: 'displayName', required: false, skipPrompt: true, }, { type: 'text', - name: 'service', - message: 'service', + name: 'email', + message: 'email', required: false, + skipPrompt: true, }, { type: 'text', - name: 'identifier', - message: 'identifier', + name: 'title', + message: 'title', required: false, + skipPrompt: true, }, { - type: 'json', - name: 'details', - message: 'details', + type: 'text', + name: 'bio', + message: 'bio', required: false, + skipPrompt: true, }, { - type: 'boolean', - name: 'isVerified', - message: 'isVerified', + type: 'text', + name: 'profilePicture', + message: 'profilePicture', required: false, skipPrompt: true, }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined(answers, fieldSchema) as ConnectedAccountPatch; + const cleanedData = stripUndefined(answers, fieldSchema) as OrgMemberProfilePatch; const client = getClient(); - const result = await client.connectedAccount + const result = await client.orgMemberProfile .update({ where: { id: answers.id as string, }, data: { - ownerId: cleanedData.ownerId, - service: cleanedData.service, - identifier: cleanedData.identifier, - details: cleanedData.details, - isVerified: cleanedData.isVerified, + membershipId: cleanedData.membershipId, + entityId: cleanedData.entityId, + actorId: cleanedData.actorId, + displayName: cleanedData.displayName, + email: cleanedData.email, + title: cleanedData.title, + bio: cleanedData.bio, + profilePicture: cleanedData.profilePicture, }, select: { id: true, - ownerId: true, - service: true, - identifier: true, - details: true, - isVerified: true, createdAt: true, updatedAt: true, + membershipId: true, + entityId: true, + actorId: true, + displayName: true, + email: true, + title: true, + bio: true, + profilePicture: true, }, }) .execute(); @@ -326,7 +392,7 @@ async function handleDelete(argv: Partial>, prompter: In ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const client = getClient(); - const result = await client.connectedAccount + const result = await client.orgMemberProfile .delete({ where: { id: answers.id as string, diff --git a/sdk/constructive-cli/src/admin/cli/commands/org-membership.ts b/sdk/constructive-cli/src/admin/cli/commands/org-membership.ts index 0810171d5..a1bb84dcd 100644 --- a/sdk/constructive-cli/src/admin/cli/commands/org-membership.ts +++ b/sdk/constructive-cli/src/admin/cli/commands/org-membership.ts @@ -25,12 +25,14 @@ const fieldSchema: FieldSchema = { isBanned: 'boolean', isDisabled: 'boolean', isActive: 'boolean', + isExternal: 'boolean', isOwner: 'boolean', isAdmin: 'boolean', permissions: 'string', granted: 'string', actorId: 'uuid', entityId: 'uuid', + isReadOnly: 'boolean', profileId: 'uuid', }; const usage = @@ -93,12 +95,14 @@ async function handleList(argv: Partial>, _prompter: Inq isBanned: true, isDisabled: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, + isReadOnly: true, profileId: true, }; const findManyArgs = parseFindManyArgs< @@ -129,12 +133,14 @@ async function handleFindFirst(argv: Partial>, _prompter isBanned: true, isDisabled: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, + isReadOnly: true, profileId: true, }; const findFirstArgs = parseFindFirstArgs< @@ -177,12 +183,14 @@ async function handleGet(argv: Partial>, prompter: Inqui isBanned: true, isDisabled: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, + isReadOnly: true, profileId: true, }, }) @@ -241,6 +249,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'boolean', + name: 'isExternal', + message: 'isExternal', + required: false, + skipPrompt: true, + }, { type: 'boolean', name: 'isOwner', @@ -281,6 +296,13 @@ async function handleCreate(argv: Partial>, prompter: In message: 'entityId', required: true, }, + { + type: 'boolean', + name: 'isReadOnly', + message: 'isReadOnly', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'profileId', @@ -304,12 +326,14 @@ async function handleCreate(argv: Partial>, prompter: In isBanned: cleanedData.isBanned, isDisabled: cleanedData.isDisabled, isActive: cleanedData.isActive, + isExternal: cleanedData.isExternal, isOwner: cleanedData.isOwner, isAdmin: cleanedData.isAdmin, permissions: cleanedData.permissions, granted: cleanedData.granted, actorId: cleanedData.actorId, entityId: cleanedData.entityId, + isReadOnly: cleanedData.isReadOnly, profileId: cleanedData.profileId, }, select: { @@ -322,12 +346,14 @@ async function handleCreate(argv: Partial>, prompter: In isBanned: true, isDisabled: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, + isReadOnly: true, profileId: true, }, }) @@ -392,6 +418,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'boolean', + name: 'isExternal', + message: 'isExternal', + required: false, + skipPrompt: true, + }, { type: 'boolean', name: 'isOwner', @@ -432,6 +465,13 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'entityId', required: false, }, + { + type: 'boolean', + name: 'isReadOnly', + message: 'isReadOnly', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'profileId', @@ -455,12 +495,14 @@ async function handleUpdate(argv: Partial>, prompter: In isBanned: cleanedData.isBanned, isDisabled: cleanedData.isDisabled, isActive: cleanedData.isActive, + isExternal: cleanedData.isExternal, isOwner: cleanedData.isOwner, isAdmin: cleanedData.isAdmin, permissions: cleanedData.permissions, granted: cleanedData.granted, actorId: cleanedData.actorId, entityId: cleanedData.entityId, + isReadOnly: cleanedData.isReadOnly, profileId: cleanedData.profileId, }, select: { @@ -473,12 +515,14 @@ async function handleUpdate(argv: Partial>, prompter: In isBanned: true, isDisabled: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, + isReadOnly: true, profileId: true, }, }) diff --git a/sdk/constructive-cli/src/admin/orm/README.md b/sdk/constructive-cli/src/admin/orm/README.md index bb7c574ae..6d694a7cf 100644 --- a/sdk/constructive-cli/src/admin/orm/README.md +++ b/sdk/constructive-cli/src/admin/orm/README.md @@ -35,24 +35,25 @@ const db = createClient({ | `orgLimitDefault` | findMany, findOne, create, update, delete | | `orgAdminGrant` | findMany, findOne, create, update, delete | | `orgOwnerGrant` | findMany, findOne, create, update, delete | -| `membershipType` | findMany, findOne, create, update, delete | | `appLimit` | findMany, findOne, create, update, delete | | `appAchievement` | findMany, findOne, create, update, delete | | `appStep` | findMany, findOne, create, update, delete | | `appClaimedInvite` | findMany, findOne, create, update, delete | | `orgChartEdgeGrant` | findMany, findOne, create, update, delete | | `orgLimit` | findMany, findOne, create, update, delete | +| `membershipType` | findMany, findOne, create, update, delete | | `appGrant` | findMany, findOne, create, update, delete | | `appMembershipDefault` | findMany, findOne, create, update, delete | | `orgClaimedInvite` | findMany, findOne, create, update, delete | | `orgGrant` | findMany, findOne, create, update, delete | | `orgChartEdge` | findMany, findOne, create, update, delete | | `orgMembershipDefault` | findMany, findOne, create, update, delete | +| `orgMemberProfile` | findMany, findOne, create, update, delete | | `appLevel` | findMany, findOne, create, update, delete | | `appInvite` | findMany, findOne, create, update, delete | +| `orgInvite` | findMany, findOne, create, update, delete | | `appMembership` | findMany, findOne, create, update, delete | | `orgMembership` | findMany, findOne, create, update, delete | -| `orgInvite` | findMany, findOne, create, update, delete | ## Table Operations @@ -511,38 +512,6 @@ const updated = await db.orgOwnerGrant.update({ where: { id: '' }, data: { const deleted = await db.orgOwnerGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.membershipType` - -CRUD operations for MembershipType records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | Int | No | -| `name` | String | Yes | -| `description` | String | Yes | -| `prefix` | String | Yes | - -**Operations:** - -```typescript -// List all membershipType records -const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true } }).execute(); - -// Get one by id -const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true } }).execute(); - -// Create -const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); -``` - ### `db.appLimit` CRUD operations for AppLimit records. @@ -749,6 +718,40 @@ const updated = await db.orgLimit.update({ where: { id: '' }, data: { name const deleted = await db.orgLimit.delete({ where: { id: '' } }).execute(); ``` +### `db.membershipType` + +CRUD operations for MembershipType records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | Int | No | +| `name` | String | Yes | +| `description` | String | Yes | +| `prefix` | String | Yes | +| `parentMembershipType` | Int | Yes | +| `hasUsersTableEntry` | Boolean | Yes | + +**Operations:** + +```typescript +// List all membershipType records +const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Get one by id +const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Create +const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); +``` + ### `db.appGrant` CRUD operations for AppGrant records. @@ -963,6 +966,45 @@ const updated = await db.orgMembershipDefault.update({ where: { id: '' }, const deleted = await db.orgMembershipDefault.delete({ where: { id: '' } }).execute(); ``` +### `db.orgMemberProfile` + +CRUD operations for OrgMemberProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `membershipId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `actorId` | UUID | Yes | +| `displayName` | String | Yes | +| `email` | String | Yes | +| `title` | String | Yes | +| `bio` | String | Yes | +| `profilePicture` | ConstructiveInternalTypeImage | Yes | + +**Operations:** + +```typescript +// List all orgMemberProfile records +const items = await db.orgMemberProfile.findMany({ select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Get one by id +const item = await db.orgMemberProfile.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Create +const created = await db.orgMemberProfile.create({ data: { membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgMemberProfile.update({ where: { id: '' }, data: { membershipId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgMemberProfile.delete({ where: { id: '' } }).execute(); +``` + ### `db.appLevel` CRUD operations for AppLevel records. @@ -1038,53 +1080,51 @@ const updated = await db.appInvite.update({ where: { id: '' }, data: { ema const deleted = await db.appInvite.delete({ where: { id: '' } }).execute(); ``` -### `db.appMembership` +### `db.orgInvite` -CRUD operations for AppMembership records. +CRUD operations for OrgInvite records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | +| `email` | ConstructiveInternalTypeEmail | Yes | +| `senderId` | UUID | Yes | +| `receiverId` | UUID | Yes | +| `inviteToken` | String | Yes | +| `inviteValid` | Boolean | Yes | +| `inviteLimit` | Int | Yes | +| `inviteCount` | Int | Yes | +| `multiple` | Boolean | Yes | +| `data` | JSON | Yes | +| `expiresAt` | Datetime | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | -| `createdBy` | UUID | Yes | -| `updatedBy` | UUID | Yes | -| `isApproved` | Boolean | Yes | -| `isBanned` | Boolean | Yes | -| `isDisabled` | Boolean | Yes | -| `isVerified` | Boolean | Yes | -| `isActive` | Boolean | Yes | -| `isOwner` | Boolean | Yes | -| `isAdmin` | Boolean | Yes | -| `permissions` | BitString | Yes | -| `granted` | BitString | Yes | -| `actorId` | UUID | Yes | -| `profileId` | UUID | Yes | +| `entityId` | UUID | Yes | **Operations:** ```typescript -// List all appMembership records -const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +// List all orgInvite records +const items = await db.orgInvite.findMany({ select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); // Get one by id -const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +const item = await db.orgInvite.findOne({ id: '', select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); // Create -const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.orgInvite.create({ data: { email: '', senderId: '', receiverId: '', inviteToken: '', inviteValid: '', inviteLimit: '', inviteCount: '', multiple: '', data: '', expiresAt: '', entityId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); +const updated = await db.orgInvite.update({ where: { id: '' }, data: { email: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appMembership.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgInvite.delete({ where: { id: '' } }).execute(); ``` -### `db.orgMembership` +### `db.appMembership` -CRUD operations for OrgMembership records. +CRUD operations for AppMembership records. **Fields:** @@ -1098,74 +1138,79 @@ CRUD operations for OrgMembership records. | `isApproved` | Boolean | Yes | | `isBanned` | Boolean | Yes | | `isDisabled` | Boolean | Yes | +| `isVerified` | Boolean | Yes | | `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isAdmin` | Boolean | Yes | | `permissions` | BitString | Yes | | `granted` | BitString | Yes | | `actorId` | UUID | Yes | -| `entityId` | UUID | Yes | | `profileId` | UUID | Yes | **Operations:** ```typescript -// List all orgMembership records -const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +// List all appMembership records +const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Get one by id -const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Create -const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); +const updated = await db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgMembership.delete({ where: { id: '' } }).execute(); +const deleted = await db.appMembership.delete({ where: { id: '' } }).execute(); ``` -### `db.orgInvite` +### `db.orgMembership` -CRUD operations for OrgInvite records. +CRUD operations for OrgMembership records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | -| `email` | ConstructiveInternalTypeEmail | Yes | -| `senderId` | UUID | Yes | -| `receiverId` | UUID | Yes | -| `inviteToken` | String | Yes | -| `inviteValid` | Boolean | Yes | -| `inviteLimit` | Int | Yes | -| `inviteCount` | Int | Yes | -| `multiple` | Boolean | Yes | -| `data` | JSON | Yes | -| `expiresAt` | Datetime | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `updatedBy` | UUID | Yes | +| `isApproved` | Boolean | Yes | +| `isBanned` | Boolean | Yes | +| `isDisabled` | Boolean | Yes | +| `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | +| `isOwner` | Boolean | Yes | +| `isAdmin` | Boolean | Yes | +| `permissions` | BitString | Yes | +| `granted` | BitString | Yes | +| `actorId` | UUID | Yes | | `entityId` | UUID | Yes | +| `isReadOnly` | Boolean | Yes | +| `profileId` | UUID | Yes | **Operations:** ```typescript -// List all orgInvite records -const items = await db.orgInvite.findMany({ select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); +// List all orgMembership records +const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Get one by id -const item = await db.orgInvite.findOne({ id: '', select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); +const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Create -const created = await db.orgInvite.create({ data: { email: '', senderId: '', receiverId: '', inviteToken: '', inviteValid: '', inviteLimit: '', inviteCount: '', multiple: '', data: '', expiresAt: '', entityId: '' }, select: { id: true } }).execute(); +const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgInvite.update({ where: { id: '' }, data: { email: '' }, select: { id: true } }).execute(); +const updated = await db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgInvite.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgMembership.delete({ where: { id: '' } }).execute(); ``` ## Custom Operations diff --git a/sdk/constructive-cli/src/admin/orm/index.ts b/sdk/constructive-cli/src/admin/orm/index.ts index b32258228..ee07e6d72 100644 --- a/sdk/constructive-cli/src/admin/orm/index.ts +++ b/sdk/constructive-cli/src/admin/orm/index.ts @@ -19,24 +19,25 @@ import { AppLimitDefaultModel } from './models/appLimitDefault'; import { OrgLimitDefaultModel } from './models/orgLimitDefault'; import { OrgAdminGrantModel } from './models/orgAdminGrant'; import { OrgOwnerGrantModel } from './models/orgOwnerGrant'; -import { MembershipTypeModel } from './models/membershipType'; import { AppLimitModel } from './models/appLimit'; import { AppAchievementModel } from './models/appAchievement'; import { AppStepModel } from './models/appStep'; import { AppClaimedInviteModel } from './models/appClaimedInvite'; import { OrgChartEdgeGrantModel } from './models/orgChartEdgeGrant'; import { OrgLimitModel } from './models/orgLimit'; +import { MembershipTypeModel } from './models/membershipType'; import { AppGrantModel } from './models/appGrant'; import { AppMembershipDefaultModel } from './models/appMembershipDefault'; import { OrgClaimedInviteModel } from './models/orgClaimedInvite'; import { OrgGrantModel } from './models/orgGrant'; import { OrgChartEdgeModel } from './models/orgChartEdge'; import { OrgMembershipDefaultModel } from './models/orgMembershipDefault'; +import { OrgMemberProfileModel } from './models/orgMemberProfile'; import { AppLevelModel } from './models/appLevel'; import { AppInviteModel } from './models/appInvite'; +import { OrgInviteModel } from './models/orgInvite'; import { AppMembershipModel } from './models/appMembership'; import { OrgMembershipModel } from './models/orgMembership'; -import { OrgInviteModel } from './models/orgInvite'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; @@ -87,24 +88,25 @@ export function createClient(config: OrmClientConfig) { orgLimitDefault: new OrgLimitDefaultModel(client), orgAdminGrant: new OrgAdminGrantModel(client), orgOwnerGrant: new OrgOwnerGrantModel(client), - membershipType: new MembershipTypeModel(client), appLimit: new AppLimitModel(client), appAchievement: new AppAchievementModel(client), appStep: new AppStepModel(client), appClaimedInvite: new AppClaimedInviteModel(client), orgChartEdgeGrant: new OrgChartEdgeGrantModel(client), orgLimit: new OrgLimitModel(client), + membershipType: new MembershipTypeModel(client), appGrant: new AppGrantModel(client), appMembershipDefault: new AppMembershipDefaultModel(client), orgClaimedInvite: new OrgClaimedInviteModel(client), orgGrant: new OrgGrantModel(client), orgChartEdge: new OrgChartEdgeModel(client), orgMembershipDefault: new OrgMembershipDefaultModel(client), + orgMemberProfile: new OrgMemberProfileModel(client), appLevel: new AppLevelModel(client), appInvite: new AppInviteModel(client), + orgInvite: new OrgInviteModel(client), appMembership: new AppMembershipModel(client), orgMembership: new OrgMembershipModel(client), - orgInvite: new OrgInviteModel(client), query: createQueryOperations(client), mutation: createMutationOperations(client), }; diff --git a/sdk/constructive-cli/src/admin/orm/input-types.ts b/sdk/constructive-cli/src/admin/orm/input-types.ts index 66dd2861c..e65a723bc 100644 --- a/sdk/constructive-cli/src/admin/orm/input-types.ts +++ b/sdk/constructive-cli/src/admin/orm/input-types.ts @@ -370,17 +370,6 @@ export interface OrgOwnerGrant { createdAt?: string | null; updatedAt?: string | null; } -/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ -export interface MembershipType { - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; - /** Human-readable name of the membership type */ - name?: string | null; - /** Description of what this membership type represents */ - description?: string | null; - /** Short prefix used to namespace tables and functions for this membership scope */ - prefix?: string | null; -} /** Tracks per-actor usage counts against configurable maximum limits */ export interface AppLimit { id: string; @@ -460,6 +449,21 @@ export interface OrgLimit { max?: number | null; entityId?: string | null; } +/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ +export interface MembershipType { + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; + /** Human-readable name of the membership type */ + name?: string | null; + /** Description of what this membership type represents */ + description?: string | null; + /** Short prefix used to namespace tables and functions for this membership scope */ + prefix?: string | null; + /** Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) */ + parentMembershipType?: number | null; + /** When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs */ + hasUsersTableEntry?: boolean | null; +} /** Records of individual permission grants and revocations for members via bitmask */ export interface AppGrant { id: string; @@ -545,6 +549,28 @@ export interface OrgMembershipDefault { /** When a group is created, whether to auto-add existing org members as group members */ createGroupsCascadeMembers?: boolean | null; } +/** Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) */ +export interface OrgMemberProfile { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** References the membership this profile belongs to (1:1) */ + membershipId?: string | null; + /** References the entity this profile belongs to (used for RLS lookups) */ + entityId?: string | null; + /** References the user who owns this profile (for self-edit RLS) */ + actorId?: string | null; + /** Display name shown to other entity members */ + displayName?: string | null; + /** Email address visible to other entity members (auto-populated from verified primary email) */ + email?: string | null; + /** Job title or role description visible to other entity members */ + title?: string | null; + /** Short biography visible to other entity members */ + bio?: string | null; + /** Profile picture visible to other entity members */ + profilePicture?: ConstructiveInternalTypeImage | null; +} /** Defines available levels that users can achieve by completing requirements */ export interface AppLevel { id: string; @@ -583,6 +609,33 @@ export interface AppInvite { createdAt?: string | null; updatedAt?: string | null; } +/** Invitation records sent to prospective members via email, with token-based redemption and expiration */ +export interface OrgInvite { + id: string; + /** Email address of the invited recipient */ + email?: ConstructiveInternalTypeEmail | null; + /** User ID of the member who sent this invitation */ + senderId?: string | null; + /** User ID of the intended recipient, if targeting a specific user */ + receiverId?: string | null; + /** Unique random hex token used to redeem this invitation */ + inviteToken?: string | null; + /** Whether this invitation is still valid and can be redeemed */ + inviteValid?: boolean | null; + /** Maximum number of times this invite can be claimed; -1 means unlimited */ + inviteLimit?: number | null; + /** Running count of how many times this invite has been claimed */ + inviteCount?: number | null; + /** Whether this invite can be claimed by multiple recipients */ + multiple?: boolean | null; + /** Optional JSON payload of additional invite metadata */ + data?: Record | null; + /** Timestamp after which this invitation can no longer be redeemed */ + expiresAt?: string | null; + createdAt?: string | null; + updatedAt?: string | null; + entityId?: string | null; +} /** Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status */ export interface AppMembership { id: string; @@ -600,6 +653,8 @@ export interface AppMembership { isVerified?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -627,6 +682,8 @@ export interface OrgMembership { isDisabled?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -639,35 +696,10 @@ export interface OrgMembership { actorId?: string | null; /** References the entity (org or group) this membership belongs to */ entityId?: string | null; + /** Whether this member has read-only access (blocks mutations when true) */ + isReadOnly?: boolean | null; profileId?: string | null; } -/** Invitation records sent to prospective members via email, with token-based redemption and expiration */ -export interface OrgInvite { - id: string; - /** Email address of the invited recipient */ - email?: ConstructiveInternalTypeEmail | null; - /** User ID of the member who sent this invitation */ - senderId?: string | null; - /** User ID of the intended recipient, if targeting a specific user */ - receiverId?: string | null; - /** Unique random hex token used to redeem this invitation */ - inviteToken?: string | null; - /** Whether this invitation is still valid and can be redeemed */ - inviteValid?: boolean | null; - /** Maximum number of times this invite can be claimed; -1 means unlimited */ - inviteLimit?: number | null; - /** Running count of how many times this invite has been claimed */ - inviteCount?: number | null; - /** Whether this invite can be claimed by multiple recipients */ - multiple?: boolean | null; - /** Optional JSON payload of additional invite metadata */ - data?: Record | null; - /** Timestamp after which this invitation can no longer be redeemed */ - expiresAt?: string | null; - createdAt?: string | null; - updatedAt?: string | null; - entityId?: string | null; -} // ============ Relation Helper Types ============ export interface ConnectionResult { nodes: T[]; @@ -695,24 +727,29 @@ export interface AppLimitDefaultRelations {} export interface OrgLimitDefaultRelations {} export interface OrgAdminGrantRelations {} export interface OrgOwnerGrantRelations {} -export interface MembershipTypeRelations {} export interface AppLimitRelations {} export interface AppAchievementRelations {} export interface AppStepRelations {} export interface AppClaimedInviteRelations {} export interface OrgChartEdgeGrantRelations {} export interface OrgLimitRelations {} +export interface MembershipTypeRelations {} export interface AppGrantRelations {} export interface AppMembershipDefaultRelations {} export interface OrgClaimedInviteRelations {} export interface OrgGrantRelations {} export interface OrgChartEdgeRelations {} export interface OrgMembershipDefaultRelations {} +export interface OrgMemberProfileRelations { + membership?: OrgMembership | null; +} export interface AppLevelRelations {} export interface AppInviteRelations {} -export interface AppMembershipRelations {} -export interface OrgMembershipRelations {} export interface OrgInviteRelations {} +export interface AppMembershipRelations {} +export interface OrgMembershipRelations { + orgMemberProfileByMembershipId?: OrgMemberProfile | null; +} // ============ Entity Types With Relations ============ export type OrgGetManagersRecordWithRelations = OrgGetManagersRecord & OrgGetManagersRecordRelations; @@ -732,13 +769,13 @@ export type AppLimitDefaultWithRelations = AppLimitDefault & AppLimitDefaultRela export type OrgLimitDefaultWithRelations = OrgLimitDefault & OrgLimitDefaultRelations; export type OrgAdminGrantWithRelations = OrgAdminGrant & OrgAdminGrantRelations; export type OrgOwnerGrantWithRelations = OrgOwnerGrant & OrgOwnerGrantRelations; -export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type AppLimitWithRelations = AppLimit & AppLimitRelations; export type AppAchievementWithRelations = AppAchievement & AppAchievementRelations; export type AppStepWithRelations = AppStep & AppStepRelations; export type AppClaimedInviteWithRelations = AppClaimedInvite & AppClaimedInviteRelations; export type OrgChartEdgeGrantWithRelations = OrgChartEdgeGrant & OrgChartEdgeGrantRelations; export type OrgLimitWithRelations = OrgLimit & OrgLimitRelations; +export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type AppGrantWithRelations = AppGrant & AppGrantRelations; export type AppMembershipDefaultWithRelations = AppMembershipDefault & AppMembershipDefaultRelations; @@ -747,11 +784,12 @@ export type OrgGrantWithRelations = OrgGrant & OrgGrantRelations; export type OrgChartEdgeWithRelations = OrgChartEdge & OrgChartEdgeRelations; export type OrgMembershipDefaultWithRelations = OrgMembershipDefault & OrgMembershipDefaultRelations; +export type OrgMemberProfileWithRelations = OrgMemberProfile & OrgMemberProfileRelations; export type AppLevelWithRelations = AppLevel & AppLevelRelations; export type AppInviteWithRelations = AppInvite & AppInviteRelations; +export type OrgInviteWithRelations = OrgInvite & OrgInviteRelations; export type AppMembershipWithRelations = AppMembership & AppMembershipRelations; export type OrgMembershipWithRelations = OrgMembership & OrgMembershipRelations; -export type OrgInviteWithRelations = OrgInvite & OrgInviteRelations; // ============ Entity Select Types ============ export type OrgGetManagersRecordSelect = { userId?: boolean; @@ -844,12 +882,6 @@ export type OrgOwnerGrantSelect = { createdAt?: boolean; updatedAt?: boolean; }; -export type MembershipTypeSelect = { - id?: boolean; - name?: boolean; - description?: boolean; - prefix?: boolean; -}; export type AppLimitSelect = { id?: boolean; name?: boolean; @@ -900,6 +932,14 @@ export type OrgLimitSelect = { max?: boolean; entityId?: boolean; }; +export type MembershipTypeSelect = { + id?: boolean; + name?: boolean; + description?: boolean; + prefix?: boolean; + parentMembershipType?: boolean; + hasUsersTableEntry?: boolean; +}; export type AppGrantSelect = { id?: boolean; permissions?: boolean; @@ -958,6 +998,22 @@ export type OrgMembershipDefaultSelect = { deleteMemberCascadeGroups?: boolean; createGroupsCascadeMembers?: boolean; }; +export type OrgMemberProfileSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + membershipId?: boolean; + entityId?: boolean; + actorId?: boolean; + displayName?: boolean; + email?: boolean; + title?: boolean; + bio?: boolean; + profilePicture?: boolean; + membership?: { + select: OrgMembershipSelect; + }; +}; export type AppLevelSelect = { id?: boolean; name?: boolean; @@ -981,6 +1037,22 @@ export type AppInviteSelect = { createdAt?: boolean; updatedAt?: boolean; }; +export type OrgInviteSelect = { + id?: boolean; + email?: boolean; + senderId?: boolean; + receiverId?: boolean; + inviteToken?: boolean; + inviteValid?: boolean; + inviteLimit?: boolean; + inviteCount?: boolean; + multiple?: boolean; + data?: boolean; + expiresAt?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + entityId?: boolean; +}; export type AppMembershipSelect = { id?: boolean; createdAt?: boolean; @@ -992,6 +1064,7 @@ export type AppMembershipSelect = { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; @@ -1009,29 +1082,18 @@ export type OrgMembershipSelect = { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; granted?: boolean; actorId?: boolean; entityId?: boolean; + isReadOnly?: boolean; profileId?: boolean; -}; -export type OrgInviteSelect = { - id?: boolean; - email?: boolean; - senderId?: boolean; - receiverId?: boolean; - inviteToken?: boolean; - inviteValid?: boolean; - inviteLimit?: boolean; - inviteCount?: boolean; - multiple?: boolean; - data?: boolean; - expiresAt?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - entityId?: boolean; + orgMemberProfileByMembershipId?: { + select: OrgMemberProfileSelect; + }; }; // ============ Table Filter Types ============ export interface OrgGetManagersRecordFilter { @@ -1262,22 +1324,6 @@ export interface OrgOwnerGrantFilter { /** Negates the expression. */ not?: OrgOwnerGrantFilter; } -export interface MembershipTypeFilter { - /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Checks for all expressions in this list. */ - and?: MembershipTypeFilter[]; - /** Checks for any expressions in this list. */ - or?: MembershipTypeFilter[]; - /** Negates the expression. */ - not?: MembershipTypeFilter; -} export interface AppLimitFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1400,6 +1446,26 @@ export interface OrgLimitFilter { /** Negates the expression. */ not?: OrgLimitFilter; } +export interface MembershipTypeFilter { + /** Filter by the object’s `id` field. */ + id?: IntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `parentMembershipType` field. */ + parentMembershipType?: IntFilter; + /** Filter by the object’s `hasUsersTableEntry` field. */ + hasUsersTableEntry?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: MembershipTypeFilter[]; + /** Checks for any expressions in this list. */ + or?: MembershipTypeFilter[]; + /** Negates the expression. */ + not?: MembershipTypeFilter; +} export interface AppGrantFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1538,6 +1604,38 @@ export interface OrgMembershipDefaultFilter { /** Negates the expression. */ not?: OrgMembershipDefaultFilter; } +export interface OrgMemberProfileFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; +} export interface AppLevelFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1590,6 +1688,40 @@ export interface AppInviteFilter { /** Negates the expression. */ not?: AppInviteFilter; } +export interface OrgInviteFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `email` field. */ + email?: ConstructiveInternalTypeEmailFilter; + /** Filter by the object’s `senderId` field. */ + senderId?: UUIDFilter; + /** Filter by the object’s `receiverId` field. */ + receiverId?: UUIDFilter; + /** Filter by the object’s `inviteToken` field. */ + inviteToken?: StringFilter; + /** Filter by the object’s `inviteValid` field. */ + inviteValid?: BooleanFilter; + /** Filter by the object’s `inviteLimit` field. */ + inviteLimit?: IntFilter; + /** Filter by the object’s `inviteCount` field. */ + inviteCount?: IntFilter; + /** Filter by the object’s `multiple` field. */ + multiple?: BooleanFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgInviteFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgInviteFilter[]; + /** Negates the expression. */ + not?: OrgInviteFilter; +} export interface AppMembershipFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1611,6 +1743,8 @@ export interface AppMembershipFilter { isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -1649,6 +1783,8 @@ export interface OrgMembershipFilter { isDisabled?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -1661,6 +1797,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ @@ -1669,40 +1807,10 @@ export interface OrgMembershipFilter { or?: OrgMembershipFilter[]; /** Negates the expression. */ not?: OrgMembershipFilter; -} -export interface OrgInviteFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `email` field. */ - email?: ConstructiveInternalTypeEmailFilter; - /** Filter by the object’s `senderId` field. */ - senderId?: UUIDFilter; - /** Filter by the object’s `receiverId` field. */ - receiverId?: UUIDFilter; - /** Filter by the object’s `inviteToken` field. */ - inviteToken?: StringFilter; - /** Filter by the object’s `inviteValid` field. */ - inviteValid?: BooleanFilter; - /** Filter by the object’s `inviteLimit` field. */ - inviteLimit?: IntFilter; - /** Filter by the object’s `inviteCount` field. */ - inviteCount?: IntFilter; - /** Filter by the object’s `multiple` field. */ - multiple?: BooleanFilter; - /** Filter by the object’s `expiresAt` field. */ - expiresAt?: DatetimeFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: OrgInviteFilter[]; - /** Checks for any expressions in this list. */ - or?: OrgInviteFilter[]; - /** Negates the expression. */ - not?: OrgInviteFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; } // ============ OrderBy Types ============ export type OrgGetManagersRecordsOrderBy = @@ -1887,18 +1995,6 @@ export type OrgOwnerGrantOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type MembershipTypeOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'DESCRIPTION_ASC' - | 'DESCRIPTION_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC'; export type AppLimitOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1999,6 +2095,22 @@ export type OrgLimitOrderBy = | 'MAX_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC'; +export type MembershipTypeOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PARENT_MEMBERSHIP_TYPE_ASC' + | 'PARENT_MEMBERSHIP_TYPE_DESC' + | 'HAS_USERS_TABLE_ENTRY_ASC' + | 'HAS_USERS_TABLE_ENTRY_DESC'; export type AppGrantOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -2115,6 +2227,32 @@ export type OrgMembershipDefaultOrderBy = | 'DELETE_MEMBER_CASCADE_GROUPS_DESC' | 'CREATE_GROUPS_CASCADE_MEMBERS_ASC' | 'CREATE_GROUPS_CASCADE_MEMBERS_DESC'; +export type OrgMemberProfileOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'BIO_ASC' + | 'BIO_DESC' + | 'PROFILE_PICTURE_ASC' + | 'PROFILE_PICTURE_DESC'; export type AppLevelOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -2161,6 +2299,38 @@ export type AppInviteOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgInviteOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'SENDER_ID_ASC' + | 'SENDER_ID_DESC' + | 'RECEIVER_ID_ASC' + | 'RECEIVER_ID_DESC' + | 'INVITE_TOKEN_ASC' + | 'INVITE_TOKEN_DESC' + | 'INVITE_VALID_ASC' + | 'INVITE_VALID_DESC' + | 'INVITE_LIMIT_ASC' + | 'INVITE_LIMIT_DESC' + | 'INVITE_COUNT_ASC' + | 'INVITE_COUNT_DESC' + | 'MULTIPLE_ASC' + | 'MULTIPLE_DESC' + | 'DATA_ASC' + | 'DATA_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC'; export type AppMembershipOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -2185,6 +2355,8 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -2219,6 +2391,8 @@ export type OrgMembershipOrderBy = | 'IS_DISABLED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -2231,40 +2405,10 @@ export type OrgMembershipOrderBy = | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' | 'PROFILE_ID_ASC' | 'PROFILE_ID_DESC'; -export type OrgInviteOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'EMAIL_ASC' - | 'EMAIL_DESC' - | 'SENDER_ID_ASC' - | 'SENDER_ID_DESC' - | 'RECEIVER_ID_ASC' - | 'RECEIVER_ID_DESC' - | 'INVITE_TOKEN_ASC' - | 'INVITE_TOKEN_DESC' - | 'INVITE_VALID_ASC' - | 'INVITE_VALID_DESC' - | 'INVITE_LIMIT_ASC' - | 'INVITE_LIMIT_DESC' - | 'INVITE_COUNT_ASC' - | 'INVITE_COUNT_DESC' - | 'MULTIPLE_ASC' - | 'MULTIPLE_DESC' - | 'DATA_ASC' - | 'DATA_DESC' - | 'EXPIRES_AT_ASC' - | 'EXPIRES_AT_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC'; // ============ CRUD Input Types ============ export interface CreateOrgGetManagersRecordInput { clientMutationId?: string; @@ -2572,28 +2716,6 @@ export interface DeleteOrgOwnerGrantInput { clientMutationId?: string; id: string; } -export interface CreateMembershipTypeInput { - clientMutationId?: string; - membershipType: { - name: string; - description: string; - prefix: string; - }; -} -export interface MembershipTypePatch { - name?: string | null; - description?: string | null; - prefix?: string | null; -} -export interface UpdateMembershipTypeInput { - clientMutationId?: string; - id: number; - membershipTypePatch: MembershipTypePatch; -} -export interface DeleteMembershipTypeInput { - clientMutationId?: string; - id: number; -} export interface CreateAppLimitInput { clientMutationId?: string; appLimit: { @@ -2740,6 +2862,32 @@ export interface DeleteOrgLimitInput { clientMutationId?: string; id: string; } +export interface CreateMembershipTypeInput { + clientMutationId?: string; + membershipType: { + name: string; + description: string; + prefix: string; + parentMembershipType?: number; + hasUsersTableEntry?: boolean; + }; +} +export interface MembershipTypePatch { + name?: string | null; + description?: string | null; + prefix?: string | null; + parentMembershipType?: number | null; + hasUsersTableEntry?: boolean | null; +} +export interface UpdateMembershipTypeInput { + clientMutationId?: string; + id: number; + membershipTypePatch: MembershipTypePatch; +} +export interface DeleteMembershipTypeInput { + clientMutationId?: string; + id: number; +} export interface CreateAppGrantInput { clientMutationId?: string; appGrant: { @@ -2892,6 +3040,39 @@ export interface DeleteOrgMembershipDefaultInput { clientMutationId?: string; id: string; } +export interface CreateOrgMemberProfileInput { + clientMutationId?: string; + orgMemberProfile: { + membershipId: string; + entityId: string; + actorId: string; + displayName?: string; + email?: string; + title?: string; + bio?: string; + profilePicture?: ConstructiveInternalTypeImage; + }; +} +export interface OrgMemberProfilePatch { + membershipId?: string | null; + entityId?: string | null; + actorId?: string | null; + displayName?: string | null; + email?: string | null; + title?: string | null; + bio?: string | null; + profilePicture?: ConstructiveInternalTypeImage | null; + profilePictureUpload?: File | null; +} +export interface UpdateOrgMemberProfileInput { + clientMutationId?: string; + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; +} +export interface DeleteOrgMemberProfileInput { + clientMutationId?: string; + id: string; +} export interface CreateAppLevelInput { clientMutationId?: string; appLevel: { @@ -2951,6 +3132,44 @@ export interface DeleteAppInviteInput { clientMutationId?: string; id: string; } +export interface CreateOrgInviteInput { + clientMutationId?: string; + orgInvite: { + email?: ConstructiveInternalTypeEmail; + senderId?: string; + receiverId?: string; + inviteToken?: string; + inviteValid?: boolean; + inviteLimit?: number; + inviteCount?: number; + multiple?: boolean; + data?: Record; + expiresAt?: string; + entityId: string; + }; +} +export interface OrgInvitePatch { + email?: ConstructiveInternalTypeEmail | null; + senderId?: string | null; + receiverId?: string | null; + inviteToken?: string | null; + inviteValid?: boolean | null; + inviteLimit?: number | null; + inviteCount?: number | null; + multiple?: boolean | null; + data?: Record | null; + expiresAt?: string | null; + entityId?: string | null; +} +export interface UpdateOrgInviteInput { + clientMutationId?: string; + id: string; + orgInvitePatch: OrgInvitePatch; +} +export interface DeleteOrgInviteInput { + clientMutationId?: string; + id: string; +} export interface CreateAppMembershipInput { clientMutationId?: string; appMembership: { @@ -2961,6 +3180,7 @@ export interface CreateAppMembershipInput { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; @@ -2977,6 +3197,7 @@ export interface AppMembershipPatch { isDisabled?: boolean | null; isVerified?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; @@ -3002,12 +3223,14 @@ export interface CreateOrgMembershipInput { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; granted?: string; actorId: string; entityId: string; + isReadOnly?: boolean; profileId?: string; }; } @@ -3018,58 +3241,22 @@ export interface OrgMembershipPatch { isBanned?: boolean | null; isDisabled?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; granted?: string | null; actorId?: string | null; entityId?: string | null; + isReadOnly?: boolean | null; profileId?: string | null; } export interface UpdateOrgMembershipInput { clientMutationId?: string; id: string; - orgMembershipPatch: OrgMembershipPatch; -} -export interface DeleteOrgMembershipInput { - clientMutationId?: string; - id: string; -} -export interface CreateOrgInviteInput { - clientMutationId?: string; - orgInvite: { - email?: ConstructiveInternalTypeEmail; - senderId?: string; - receiverId?: string; - inviteToken?: string; - inviteValid?: boolean; - inviteLimit?: number; - inviteCount?: number; - multiple?: boolean; - data?: Record; - expiresAt?: string; - entityId: string; - }; -} -export interface OrgInvitePatch { - email?: ConstructiveInternalTypeEmail | null; - senderId?: string | null; - receiverId?: string | null; - inviteToken?: string | null; - inviteValid?: boolean | null; - inviteLimit?: number | null; - inviteCount?: number | null; - multiple?: boolean | null; - data?: Record | null; - expiresAt?: string | null; - entityId?: string | null; -} -export interface UpdateOrgInviteInput { - clientMutationId?: string; - id: string; - orgInvitePatch: OrgInvitePatch; + orgMembershipPatch: OrgMembershipPatch; } -export interface DeleteOrgInviteInput { +export interface DeleteOrgMembershipInput { clientMutationId?: string; id: string; } @@ -3884,51 +4071,6 @@ export type DeleteOrgOwnerGrantPayloadSelect = { select: OrgOwnerGrantEdgeSelect; }; }; -export interface CreateMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was created by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} -export type CreateMembershipTypePayloadSelect = { - clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; - }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; - }; -}; -export interface UpdateMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was updated by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} -export type UpdateMembershipTypePayloadSelect = { - clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; - }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; - }; -}; -export interface DeleteMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was deleted by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} -export type DeleteMembershipTypePayloadSelect = { - clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; - }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; - }; -}; export interface CreateAppLimitPayload { clientMutationId?: string | null; /** The `AppLimit` that was created by this mutation. */ @@ -4199,6 +4341,51 @@ export type DeleteOrgLimitPayloadSelect = { select: OrgLimitEdgeSelect; }; }; +export interface CreateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was created by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type CreateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface UpdateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was updated by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type UpdateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface DeleteMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was deleted by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type DeleteMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; export interface CreateAppGrantPayload { clientMutationId?: string | null; /** The `AppGrant` that was created by this mutation. */ @@ -4469,6 +4656,51 @@ export type DeleteOrgMembershipDefaultPayloadSelect = { select: OrgMembershipDefaultEdgeSelect; }; }; +export interface CreateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was created by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type CreateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface UpdateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was updated by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type UpdateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface DeleteOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was deleted by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type DeleteOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; export interface CreateAppLevelPayload { clientMutationId?: string | null; /** The `AppLevel` that was created by this mutation. */ @@ -4559,6 +4791,51 @@ export type DeleteAppInvitePayloadSelect = { select: AppInviteEdgeSelect; }; }; +export interface CreateOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was created by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} +export type CreateOrgInvitePayloadSelect = { + clientMutationId?: boolean; + orgInvite?: { + select: OrgInviteSelect; + }; + orgInviteEdge?: { + select: OrgInviteEdgeSelect; + }; +}; +export interface UpdateOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was updated by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} +export type UpdateOrgInvitePayloadSelect = { + clientMutationId?: boolean; + orgInvite?: { + select: OrgInviteSelect; + }; + orgInviteEdge?: { + select: OrgInviteEdgeSelect; + }; +}; +export interface DeleteOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was deleted by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} +export type DeleteOrgInvitePayloadSelect = { + clientMutationId?: boolean; + orgInvite?: { + select: OrgInviteSelect; + }; + orgInviteEdge?: { + select: OrgInviteEdgeSelect; + }; +}; export interface CreateAppMembershipPayload { clientMutationId?: string | null; /** The `AppMembership` that was created by this mutation. */ @@ -4649,51 +4926,6 @@ export type DeleteOrgMembershipPayloadSelect = { select: OrgMembershipEdgeSelect; }; }; -export interface CreateOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was created by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} -export type CreateOrgInvitePayloadSelect = { - clientMutationId?: boolean; - orgInvite?: { - select: OrgInviteSelect; - }; - orgInviteEdge?: { - select: OrgInviteEdgeSelect; - }; -}; -export interface UpdateOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was updated by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} -export type UpdateOrgInvitePayloadSelect = { - clientMutationId?: boolean; - orgInvite?: { - select: OrgInviteSelect; - }; - orgInviteEdge?: { - select: OrgInviteEdgeSelect; - }; -}; -export interface DeleteOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was deleted by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} -export type DeleteOrgInvitePayloadSelect = { - clientMutationId?: boolean; - orgInvite?: { - select: OrgInviteSelect; - }; - orgInviteEdge?: { - select: OrgInviteEdgeSelect; - }; -}; /** A `AppPermission` edge in the connection. */ export interface AppPermissionEdge { cursor?: string | null; @@ -4855,18 +5087,6 @@ export type OrgOwnerGrantEdgeSelect = { select: OrgOwnerGrantSelect; }; }; -/** A `MembershipType` edge in the connection. */ -export interface MembershipTypeEdge { - cursor?: string | null; - /** The `MembershipType` at the end of the edge. */ - node?: MembershipType | null; -} -export type MembershipTypeEdgeSelect = { - cursor?: boolean; - node?: { - select: MembershipTypeSelect; - }; -}; /** A `AppLimit` edge in the connection. */ export interface AppLimitEdge { cursor?: string | null; @@ -4939,6 +5159,18 @@ export type OrgLimitEdgeSelect = { select: OrgLimitSelect; }; }; +/** A `MembershipType` edge in the connection. */ +export interface MembershipTypeEdge { + cursor?: string | null; + /** The `MembershipType` at the end of the edge. */ + node?: MembershipType | null; +} +export type MembershipTypeEdgeSelect = { + cursor?: boolean; + node?: { + select: MembershipTypeSelect; + }; +}; /** A `AppGrant` edge in the connection. */ export interface AppGrantEdge { cursor?: string | null; @@ -5011,6 +5243,18 @@ export type OrgMembershipDefaultEdgeSelect = { select: OrgMembershipDefaultSelect; }; }; +/** A `OrgMemberProfile` edge in the connection. */ +export interface OrgMemberProfileEdge { + cursor?: string | null; + /** The `OrgMemberProfile` at the end of the edge. */ + node?: OrgMemberProfile | null; +} +export type OrgMemberProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgMemberProfileSelect; + }; +}; /** A `AppLevel` edge in the connection. */ export interface AppLevelEdge { cursor?: string | null; @@ -5035,6 +5279,18 @@ export type AppInviteEdgeSelect = { select: AppInviteSelect; }; }; +/** A `OrgInvite` edge in the connection. */ +export interface OrgInviteEdge { + cursor?: string | null; + /** The `OrgInvite` at the end of the edge. */ + node?: OrgInvite | null; +} +export type OrgInviteEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgInviteSelect; + }; +}; /** A `AppMembership` edge in the connection. */ export interface AppMembershipEdge { cursor?: string | null; @@ -5059,15 +5315,3 @@ export type OrgMembershipEdgeSelect = { select: OrgMembershipSelect; }; }; -/** A `OrgInvite` edge in the connection. */ -export interface OrgInviteEdge { - cursor?: string | null; - /** The `OrgInvite` at the end of the edge. */ - node?: OrgInvite | null; -} -export type OrgInviteEdgeSelect = { - cursor?: boolean; - node?: { - select: OrgInviteSelect; - }; -}; diff --git a/sdk/constructive-cli/src/admin/orm/models/index.ts b/sdk/constructive-cli/src/admin/orm/models/index.ts index 91876b01c..a82780d8f 100644 --- a/sdk/constructive-cli/src/admin/orm/models/index.ts +++ b/sdk/constructive-cli/src/admin/orm/models/index.ts @@ -17,21 +17,22 @@ export { AppLimitDefaultModel } from './appLimitDefault'; export { OrgLimitDefaultModel } from './orgLimitDefault'; export { OrgAdminGrantModel } from './orgAdminGrant'; export { OrgOwnerGrantModel } from './orgOwnerGrant'; -export { MembershipTypeModel } from './membershipType'; export { AppLimitModel } from './appLimit'; export { AppAchievementModel } from './appAchievement'; export { AppStepModel } from './appStep'; export { AppClaimedInviteModel } from './appClaimedInvite'; export { OrgChartEdgeGrantModel } from './orgChartEdgeGrant'; export { OrgLimitModel } from './orgLimit'; +export { MembershipTypeModel } from './membershipType'; export { AppGrantModel } from './appGrant'; export { AppMembershipDefaultModel } from './appMembershipDefault'; export { OrgClaimedInviteModel } from './orgClaimedInvite'; export { OrgGrantModel } from './orgGrant'; export { OrgChartEdgeModel } from './orgChartEdge'; export { OrgMembershipDefaultModel } from './orgMembershipDefault'; +export { OrgMemberProfileModel } from './orgMemberProfile'; export { AppLevelModel } from './appLevel'; export { AppInviteModel } from './appInvite'; +export { OrgInviteModel } from './orgInvite'; export { AppMembershipModel } from './appMembership'; export { OrgMembershipModel } from './orgMembership'; -export { OrgInviteModel } from './orgInvite'; diff --git a/sdk/constructive-react/src/public/orm/models/connectedAccount.ts b/sdk/constructive-cli/src/admin/orm/models/orgMemberProfile.ts similarity index 52% rename from sdk/constructive-react/src/public/orm/models/connectedAccount.ts rename to sdk/constructive-cli/src/admin/orm/models/orgMemberProfile.ts index c9def156d..de551ba79 100644 --- a/sdk/constructive-react/src/public/orm/models/connectedAccount.ts +++ b/sdk/constructive-cli/src/admin/orm/models/orgMemberProfile.ts @@ -1,5 +1,5 @@ /** - * ConnectedAccount model for ORM client + * OrgMemberProfile model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - ConnectedAccount, - ConnectedAccountWithRelations, - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy, - CreateConnectedAccountInput, - UpdateConnectedAccountInput, - ConnectedAccountPatch, + OrgMemberProfile, + OrgMemberProfileWithRelations, + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, + CreateOrgMemberProfileInput, + UpdateOrgMemberProfileInput, + OrgMemberProfilePatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class ConnectedAccountModel { +export class OrgMemberProfileModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccounts: ConnectionResult>; + orgMemberProfiles: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: args?.where, @@ -56,58 +56,58 @@ export class ConnectedAccountModel { before: args?.before, offset: args?.offset, }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccounts: { - nodes: InferSelectResult[]; + orgMemberProfiles: { + nodes: InferSelectResult[]; }; }> { const { document, variables } = buildFindFirstDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: args?.where, }, - 'ConnectedAccountFilter', + 'OrgMemberProfileFilter', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', document, variables, }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccount: InferSelectResult | null; + orgMemberProfile: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: { @@ -117,90 +117,90 @@ export class ConnectedAccountModel { }, first: 1, }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfile', document, variables, transform: (data: { - connectedAccounts?: { - nodes?: InferSelectResult[]; + orgMemberProfiles?: { + nodes?: InferSelectResult[]; }; }) => ({ - connectedAccount: data.connectedAccounts?.nodes?.[0] ?? null, + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createConnectedAccount: { - connectedAccount: InferSelectResult; + createOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'ConnectedAccount', - 'createConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'createOrgMemberProfile', + 'orgMemberProfile', args.select, args.data, - 'CreateConnectedAccountInput', + 'CreateOrgMemberProfileInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'createConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'createOrgMemberProfile', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - ConnectedAccountPatch + OrgMemberProfilePatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateConnectedAccount: { - connectedAccount: InferSelectResult; + updateOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'ConnectedAccount', - 'updateConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'updateOrgMemberProfile', + 'orgMemberProfile', args.select, args.where.id, args.data, - 'UpdateConnectedAccountInput', + 'UpdateOrgMemberProfileInput', 'id', - 'connectedAccountPatch', + 'orgMemberProfilePatch', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'updateConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'updateOrgMemberProfile', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -208,28 +208,28 @@ export class ConnectedAccountModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteConnectedAccount: { - connectedAccount: InferSelectResult; + deleteOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'ConnectedAccount', - 'deleteConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'deleteOrgMemberProfile', + 'orgMemberProfile', { id: args.where.id, }, - 'DeleteConnectedAccountInput', + 'DeleteOrgMemberProfileInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'deleteConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'deleteOrgMemberProfile', document, variables, }); diff --git a/sdk/constructive-cli/src/auth/README.md b/sdk/constructive-cli/src/auth/README.md index 12ee8811d..03c4eee19 100644 --- a/sdk/constructive-cli/src/auth/README.md +++ b/sdk/constructive-cli/src/auth/README.md @@ -9,8 +9,8 @@ ## Overview - **Tables:** 7 -- **Custom queries:** 4 -- **Custom mutations:** 19 +- **Custom queries:** 5 +- **Custom mutations:** 24 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/auth/cli/README.md b/sdk/constructive-cli/src/auth/cli/README.md index c0b7e65d2..bcdc15b52 100644 --- a/sdk/constructive-cli/src/auth/cli/README.md +++ b/sdk/constructive-cli/src/auth/cli/README.md @@ -29,27 +29,33 @@ csdk auth set-token | `email` | email CRUD operations | | `phone-number` | phoneNumber CRUD operations | | `crypto-address` | cryptoAddress CRUD operations | -| `connected-account` | connectedAccount CRUD operations | | `audit-log` | auditLog CRUD operations | | `role-type` | roleType CRUD operations | +| `user-connected-account` | userConnectedAccount CRUD operations | | `user` | user CRUD operations | -| `current-ip-address` | currentIpAddress | | `current-user-agent` | currentUserAgent | +| `current-ip-address` | currentIpAddress | | `current-user-id` | currentUserId | +| `require-step-up` | requireStepUp | | `current-user` | currentUser | | `sign-out` | signOut | | `send-account-deletion-email` | sendAccountDeletionEmail | | `check-password` | checkPassword | +| `disconnect-account` | disconnectAccount | +| `revoke-api-key` | revokeApiKey | +| `revoke-session` | revokeSession | | `verify-password` | verifyPassword | | `verify-totp` | verifyTotp | | `confirm-delete-account` | confirmDeleteAccount | | `set-password` | setPassword | | `verify-email` | verifyEmail | +| `provision-new-user` | provisionNewUser | | `reset-password` | resetPassword | -| `sign-in-one-time-token` | signInOneTimeToken | -| `sign-in` | signIn | +| `create-api-key` | createApiKey | +| `sign-in-cross-origin` | signInCrossOrigin | | `sign-up` | signUp | -| `one-time-token` | oneTimeToken | +| `request-cross-origin-token` | requestCrossOriginToken | +| `sign-in` | signIn | | `extend-token-expires` | extendTokenExpires | | `forgot-password` | forgotPassword | | `send-verification-email` | sendVerificationEmail | @@ -191,35 +197,6 @@ CRUD operations for CryptoAddress records. **Required create fields:** `address` **Optional create fields (backend defaults):** `ownerId`, `isVerified`, `isPrimary` -### `connected-account` - -CRUD operations for ConnectedAccount records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all connectedAccount records | -| `find-first` | Find first matching connectedAccount record | -| `get` | Get a connectedAccount by id | -| `create` | Create a new connectedAccount | -| `update` | Update an existing connectedAccount | -| `delete` | Delete a connectedAccount | - -**Fields:** - -| Field | Type | -|-------|------| -| `id` | UUID | -| `ownerId` | UUID | -| `service` | String | -| `identifier` | String | -| `details` | JSON | -| `isVerified` | Boolean | -| `createdAt` | Datetime | -| `updatedAt` | Datetime | - -**Required create fields:** `service`, `identifier`, `details` -**Optional create fields (backend defaults):** `ownerId`, `isVerified` - ### `audit-log` CRUD operations for AuditLog records. @@ -271,6 +248,34 @@ CRUD operations for RoleType records. **Required create fields:** `name` +### `user-connected-account` + +CRUD operations for UserConnectedAccount records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all userConnectedAccount records | +| `find-first` | Find first matching userConnectedAccount record | +| `get` | Get a userConnectedAccount by id | +| `create` | Create a new userConnectedAccount | +| `update` | Update an existing userConnectedAccount | +| `delete` | Delete a userConnectedAccount | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `ownerId` | UUID | +| `service` | String | +| `identifier` | String | +| `details` | JSON | +| `isVerified` | Boolean | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | + +**Optional create fields (backend defaults):** `ownerId`, `service`, `identifier`, `details`, `isVerified` + ### `user` CRUD operations for User records. @@ -331,16 +336,16 @@ csdk user search "query" --limit 10 --select id,title,searchScore ## Custom Operations -### `current-ip-address` +### `current-user-agent` -currentIpAddress +currentUserAgent - **Type:** query - **Arguments:** none -### `current-user-agent` +### `current-ip-address` -currentUserAgent +currentIpAddress - **Type:** query - **Arguments:** none @@ -352,6 +357,17 @@ currentUserId - **Type:** query - **Arguments:** none +### `require-step-up` + +requireStepUp + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--stepUpType` | String | + ### `current-user` currentUser @@ -393,6 +409,42 @@ checkPassword | `--input.clientMutationId` | String | | `--input.password` | String | +### `disconnect-account` + +disconnectAccount + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.accountId` | UUID (required) | + +### `revoke-api-key` + +revokeApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.keyId` | UUID (required) | + +### `revoke-session` + +revokeSession + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.sessionId` | UUID (required) | + ### `verify-password` verifyPassword @@ -456,6 +508,19 @@ verifyEmail | `--input.emailId` | UUID | | `--input.token` | String | +### `provision-new-user` + +provisionNewUser + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.email` | String | + | `--input.password` | String | + ### `reset-password` resetPassword @@ -470,9 +535,23 @@ resetPassword | `--input.resetToken` | String | | `--input.newPassword` | String | -### `sign-in-one-time-token` +### `create-api-key` + +createApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.keyName` | String (required) | + | `--input.accessLevel` | String | + | `--input.mfaLevel` | String | + +### `sign-in-cross-origin` -signInOneTimeToken +signInCrossOrigin - **Type:** mutation - **Arguments:** @@ -483,9 +562,9 @@ signInOneTimeToken | `--input.token` | String | | `--input.credentialKind` | String | -### `sign-in` +### `sign-up` -signIn +signUp - **Type:** mutation - **Arguments:** @@ -499,9 +578,9 @@ signIn | `--input.credentialKind` | String | | `--input.csrfToken` | String | -### `sign-up` +### `request-cross-origin-token` -signUp +requestCrossOriginToken - **Type:** mutation - **Arguments:** @@ -511,13 +590,12 @@ signUp | `--input.clientMutationId` | String | | `--input.email` | String | | `--input.password` | String | + | `--input.origin` | Origin | | `--input.rememberMe` | Boolean | - | `--input.credentialKind` | String | - | `--input.csrfToken` | String | -### `one-time-token` +### `sign-in` -oneTimeToken +signIn - **Type:** mutation - **Arguments:** @@ -527,8 +605,10 @@ oneTimeToken | `--input.clientMutationId` | String | | `--input.email` | String | | `--input.password` | String | - | `--input.origin` | Origin | | `--input.rememberMe` | Boolean | + | `--input.credentialKind` | String | + | `--input.csrfToken` | String | + | `--input.deviceToken` | String | ### `extend-token-expires` diff --git a/sdk/constructive-cli/src/auth/cli/commands.ts b/sdk/constructive-cli/src/auth/cli/commands.ts index 7326a18c5..afd0eed53 100644 --- a/sdk/constructive-cli/src/auth/cli/commands.ts +++ b/sdk/constructive-cli/src/auth/cli/commands.ts @@ -9,27 +9,33 @@ import authCmd from './commands/auth'; import emailCmd from './commands/email'; import phoneNumberCmd from './commands/phone-number'; import cryptoAddressCmd from './commands/crypto-address'; -import connectedAccountCmd from './commands/connected-account'; import auditLogCmd from './commands/audit-log'; import roleTypeCmd from './commands/role-type'; +import userConnectedAccountCmd from './commands/user-connected-account'; import userCmd from './commands/user'; -import currentIpAddressCmd from './commands/current-ip-address'; import currentUserAgentCmd from './commands/current-user-agent'; +import currentIpAddressCmd from './commands/current-ip-address'; import currentUserIdCmd from './commands/current-user-id'; +import requireStepUpCmd from './commands/require-step-up'; import currentUserCmd from './commands/current-user'; import signOutCmd from './commands/sign-out'; import sendAccountDeletionEmailCmd from './commands/send-account-deletion-email'; import checkPasswordCmd from './commands/check-password'; +import disconnectAccountCmd from './commands/disconnect-account'; +import revokeApiKeyCmd from './commands/revoke-api-key'; +import revokeSessionCmd from './commands/revoke-session'; import verifyPasswordCmd from './commands/verify-password'; import verifyTotpCmd from './commands/verify-totp'; import confirmDeleteAccountCmd from './commands/confirm-delete-account'; import setPasswordCmd from './commands/set-password'; import verifyEmailCmd from './commands/verify-email'; +import provisionNewUserCmd from './commands/provision-new-user'; import resetPasswordCmd from './commands/reset-password'; -import signInOneTimeTokenCmd from './commands/sign-in-one-time-token'; -import signInCmd from './commands/sign-in'; +import createApiKeyCmd from './commands/create-api-key'; +import signInCrossOriginCmd from './commands/sign-in-cross-origin'; import signUpCmd from './commands/sign-up'; -import oneTimeTokenCmd from './commands/one-time-token'; +import requestCrossOriginTokenCmd from './commands/request-cross-origin-token'; +import signInCmd from './commands/sign-in'; import extendTokenExpiresCmd from './commands/extend-token-expires'; import forgotPasswordCmd from './commands/forgot-password'; import sendVerificationEmailCmd from './commands/send-verification-email'; @@ -49,27 +55,33 @@ const createCommandMap: () => Record< email: emailCmd, 'phone-number': phoneNumberCmd, 'crypto-address': cryptoAddressCmd, - 'connected-account': connectedAccountCmd, 'audit-log': auditLogCmd, 'role-type': roleTypeCmd, + 'user-connected-account': userConnectedAccountCmd, user: userCmd, - 'current-ip-address': currentIpAddressCmd, 'current-user-agent': currentUserAgentCmd, + 'current-ip-address': currentIpAddressCmd, 'current-user-id': currentUserIdCmd, + 'require-step-up': requireStepUpCmd, 'current-user': currentUserCmd, 'sign-out': signOutCmd, 'send-account-deletion-email': sendAccountDeletionEmailCmd, 'check-password': checkPasswordCmd, + 'disconnect-account': disconnectAccountCmd, + 'revoke-api-key': revokeApiKeyCmd, + 'revoke-session': revokeSessionCmd, 'verify-password': verifyPasswordCmd, 'verify-totp': verifyTotpCmd, 'confirm-delete-account': confirmDeleteAccountCmd, 'set-password': setPasswordCmd, 'verify-email': verifyEmailCmd, + 'provision-new-user': provisionNewUserCmd, 'reset-password': resetPasswordCmd, - 'sign-in-one-time-token': signInOneTimeTokenCmd, - 'sign-in': signInCmd, + 'create-api-key': createApiKeyCmd, + 'sign-in-cross-origin': signInCrossOriginCmd, 'sign-up': signUpCmd, - 'one-time-token': oneTimeTokenCmd, + 'request-cross-origin-token': requestCrossOriginTokenCmd, + 'sign-in': signInCmd, 'extend-token-expires': extendTokenExpiresCmd, 'forgot-password': forgotPasswordCmd, 'send-verification-email': sendVerificationEmailCmd, @@ -78,7 +90,7 @@ const createCommandMap: () => Record< 'provision-bucket': provisionBucketCmd, }); const usage = - "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n connected-account connectedAccount CRUD operations\n audit-log auditLog CRUD operations\n role-type roleType CRUD operations\n user user CRUD operations\n current-ip-address currentIpAddress\n current-user-agent currentUserAgent\n current-user-id currentUserId\n current-user currentUser\n sign-out signOut\n send-account-deletion-email sendAccountDeletionEmail\n check-password checkPassword\n verify-password verifyPassword\n verify-totp verifyTotp\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n reset-password resetPassword\n sign-in-one-time-token signInOneTimeToken\n sign-in signIn\n sign-up signUp\n one-time-token oneTimeToken\n extend-token-expires extendTokenExpires\n forgot-password forgotPassword\n send-verification-email sendVerificationEmail\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n confirm-upload Confirm that a file has been uploaded to S3.\nVerifies the object exists in S3, checks content-type,\nand transitions the file status from 'pending' to 'ready'.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n"; + "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n audit-log auditLog CRUD operations\n role-type roleType CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n user user CRUD operations\n current-user-agent currentUserAgent\n current-ip-address currentIpAddress\n current-user-id currentUserId\n require-step-up requireStepUp\n current-user currentUser\n sign-out signOut\n send-account-deletion-email sendAccountDeletionEmail\n check-password checkPassword\n disconnect-account disconnectAccount\n revoke-api-key revokeApiKey\n revoke-session revokeSession\n verify-password verifyPassword\n verify-totp verifyTotp\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n provision-new-user provisionNewUser\n reset-password resetPassword\n create-api-key createApiKey\n sign-in-cross-origin signInCrossOrigin\n sign-up signUp\n request-cross-origin-token requestCrossOriginToken\n sign-in signIn\n extend-token-expires extendTokenExpires\n forgot-password forgotPassword\n send-verification-email sendVerificationEmail\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n confirm-upload Confirm that a file has been uploaded to S3.\nVerifies the object exists in S3, checks content-type,\nand transitions the file status from 'pending' to 'ready'.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n"; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/public/cli/commands/one-time-token.ts b/sdk/constructive-cli/src/auth/cli/commands/create-api-key.ts similarity index 74% rename from sdk/constructive-cli/src/public/cli/commands/one-time-token.ts rename to sdk/constructive-cli/src/auth/cli/commands/create-api-key.ts index 79d5597c0..672db1229 100644 --- a/sdk/constructive-cli/src/public/cli/commands/one-time-token.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/create-api-key.ts @@ -1,13 +1,13 @@ /** - * CLI command for mutation oneTimeToken + * CLI command for mutation createApiKey * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { CLIOptions, Inquirerer } from 'inquirerer'; import { getClient } from '../executor'; import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { OneTimeTokenVariables } from '../../orm/mutation'; -import type { OneTimeTokenPayloadSelect } from '../../orm/input-types'; +import type { CreateApiKeyVariables } from '../../orm/mutation'; +import type { CreateApiKeyPayloadSelect } from '../../orm/input-types'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -15,7 +15,7 @@ export default async ( ) => { try { if (argv.help || argv.h) { - console.log('one-time-token - oneTimeToken\n\nUsage: one-time-token [OPTIONS]\n'); + console.log('create-api-key - createApiKey\n\nUsage: create-api-key [OPTIONS]\n'); process.exit(0); } const answers = await prompter.prompt(argv, [ @@ -31,18 +31,18 @@ export default async ( const parsedAnswers = unflattenDotNotation(answers); const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); const result = await client.mutation - .oneTimeToken( - parsedAnswers as unknown as OneTimeTokenVariables, + .createApiKey( + parsedAnswers as unknown as CreateApiKeyVariables, { select: selectFields, } as unknown as { - select: OneTimeTokenPayloadSelect; + select: CreateApiKeyPayloadSelect; } ) .execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: oneTimeToken'); + console.error('Failed: createApiKey'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/auth/cli/commands/sign-in-one-time-token.ts b/sdk/constructive-cli/src/auth/cli/commands/disconnect-account.ts similarity index 72% rename from sdk/constructive-cli/src/auth/cli/commands/sign-in-one-time-token.ts rename to sdk/constructive-cli/src/auth/cli/commands/disconnect-account.ts index 0a11613df..cf78a9609 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/sign-in-one-time-token.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/disconnect-account.ts @@ -1,13 +1,13 @@ /** - * CLI command for mutation signInOneTimeToken + * CLI command for mutation disconnectAccount * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { CLIOptions, Inquirerer } from 'inquirerer'; import { getClient } from '../executor'; import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { SignInOneTimeTokenVariables } from '../../orm/mutation'; -import type { SignInOneTimeTokenPayloadSelect } from '../../orm/input-types'; +import type { DisconnectAccountVariables } from '../../orm/mutation'; +import type { DisconnectAccountPayloadSelect } from '../../orm/input-types'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'sign-in-one-time-token - signInOneTimeToken\n\nUsage: sign-in-one-time-token [OPTIONS]\n' + 'disconnect-account - disconnectAccount\n\nUsage: disconnect-account [OPTIONS]\n' ); process.exit(0); } @@ -33,18 +33,18 @@ export default async ( const parsedAnswers = unflattenDotNotation(answers); const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); const result = await client.mutation - .signInOneTimeToken( - parsedAnswers as unknown as SignInOneTimeTokenVariables, + .disconnectAccount( + parsedAnswers as unknown as DisconnectAccountVariables, { select: selectFields, } as unknown as { - select: SignInOneTimeTokenPayloadSelect; + select: DisconnectAccountPayloadSelect; } ) .execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: signInOneTimeToken'); + console.error('Failed: disconnectAccount'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/auth/cli/commands/provision-new-user.ts b/sdk/constructive-cli/src/auth/cli/commands/provision-new-user.ts new file mode 100644 index 000000000..862bbf919 --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/provision-new-user.ts @@ -0,0 +1,51 @@ +/** + * CLI command for mutation provisionNewUser + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { ProvisionNewUserVariables } from '../../orm/mutation'; +import type { ProvisionNewUserPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('provision-new-user - provisionNewUser\n\nUsage: provision-new-user [OPTIONS]\n'); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .provisionNewUser( + parsedAnswers as unknown as ProvisionNewUserVariables, + { + select: selectFields, + } as unknown as { + select: ProvisionNewUserPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: provisionNewUser'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/auth/cli/commands/request-cross-origin-token.ts b/sdk/constructive-cli/src/auth/cli/commands/request-cross-origin-token.ts new file mode 100644 index 000000000..344a44b85 --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/request-cross-origin-token.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation requestCrossOriginToken + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { RequestCrossOriginTokenVariables } from '../../orm/mutation'; +import type { RequestCrossOriginTokenPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'request-cross-origin-token - requestCrossOriginToken\n\nUsage: request-cross-origin-token [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .requestCrossOriginToken( + parsedAnswers as unknown as RequestCrossOriginTokenVariables, + { + select: selectFields, + } as unknown as { + select: RequestCrossOriginTokenPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: requestCrossOriginToken'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/auth/cli/commands/require-step-up.ts b/sdk/constructive-cli/src/auth/cli/commands/require-step-up.ts new file mode 100644 index 000000000..9720978f4 --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/require-step-up.ts @@ -0,0 +1,38 @@ +/** + * CLI command for query requireStepUp + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import type { RequireStepUpVariables } from '../../orm/query'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('require-step-up - requireStepUp\n\nUsage: require-step-up [OPTIONS]\n'); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'stepUpType', + message: 'stepUpType', + }, + ]); + const client = getClient(); + const result = await client.query + .requireStepUp(answers as unknown as RequireStepUpVariables) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: requireStepUp'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/auth/cli/commands/one-time-token.ts b/sdk/constructive-cli/src/auth/cli/commands/revoke-api-key.ts similarity index 74% rename from sdk/constructive-cli/src/auth/cli/commands/one-time-token.ts rename to sdk/constructive-cli/src/auth/cli/commands/revoke-api-key.ts index 79d5597c0..0f159c401 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/one-time-token.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/revoke-api-key.ts @@ -1,13 +1,13 @@ /** - * CLI command for mutation oneTimeToken + * CLI command for mutation revokeApiKey * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { CLIOptions, Inquirerer } from 'inquirerer'; import { getClient } from '../executor'; import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { OneTimeTokenVariables } from '../../orm/mutation'; -import type { OneTimeTokenPayloadSelect } from '../../orm/input-types'; +import type { RevokeApiKeyVariables } from '../../orm/mutation'; +import type { RevokeApiKeyPayloadSelect } from '../../orm/input-types'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -15,7 +15,7 @@ export default async ( ) => { try { if (argv.help || argv.h) { - console.log('one-time-token - oneTimeToken\n\nUsage: one-time-token [OPTIONS]\n'); + console.log('revoke-api-key - revokeApiKey\n\nUsage: revoke-api-key [OPTIONS]\n'); process.exit(0); } const answers = await prompter.prompt(argv, [ @@ -31,18 +31,18 @@ export default async ( const parsedAnswers = unflattenDotNotation(answers); const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); const result = await client.mutation - .oneTimeToken( - parsedAnswers as unknown as OneTimeTokenVariables, + .revokeApiKey( + parsedAnswers as unknown as RevokeApiKeyVariables, { select: selectFields, } as unknown as { - select: OneTimeTokenPayloadSelect; + select: RevokeApiKeyPayloadSelect; } ) .execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: oneTimeToken'); + console.error('Failed: revokeApiKey'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/auth/cli/commands/revoke-session.ts b/sdk/constructive-cli/src/auth/cli/commands/revoke-session.ts new file mode 100644 index 000000000..8b3bc5036 --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/revoke-session.ts @@ -0,0 +1,51 @@ +/** + * CLI command for mutation revokeSession + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { RevokeSessionVariables } from '../../orm/mutation'; +import type { RevokeSessionPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('revoke-session - revokeSession\n\nUsage: revoke-session [OPTIONS]\n'); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .revokeSession( + parsedAnswers as unknown as RevokeSessionVariables, + { + select: selectFields, + } as unknown as { + select: RevokeSessionPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: revokeSession'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/public/cli/commands/sign-in-one-time-token.ts b/sdk/constructive-cli/src/auth/cli/commands/sign-in-cross-origin.ts similarity index 72% rename from sdk/constructive-cli/src/public/cli/commands/sign-in-one-time-token.ts rename to sdk/constructive-cli/src/auth/cli/commands/sign-in-cross-origin.ts index 0a11613df..33c90f1f4 100644 --- a/sdk/constructive-cli/src/public/cli/commands/sign-in-one-time-token.ts +++ b/sdk/constructive-cli/src/auth/cli/commands/sign-in-cross-origin.ts @@ -1,13 +1,13 @@ /** - * CLI command for mutation signInOneTimeToken + * CLI command for mutation signInCrossOrigin * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { CLIOptions, Inquirerer } from 'inquirerer'; import { getClient } from '../executor'; import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; -import type { SignInOneTimeTokenVariables } from '../../orm/mutation'; -import type { SignInOneTimeTokenPayloadSelect } from '../../orm/input-types'; +import type { SignInCrossOriginVariables } from '../../orm/mutation'; +import type { SignInCrossOriginPayloadSelect } from '../../orm/input-types'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'sign-in-one-time-token - signInOneTimeToken\n\nUsage: sign-in-one-time-token [OPTIONS]\n' + 'sign-in-cross-origin - signInCrossOrigin\n\nUsage: sign-in-cross-origin [OPTIONS]\n' ); process.exit(0); } @@ -33,18 +33,18 @@ export default async ( const parsedAnswers = unflattenDotNotation(answers); const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); const result = await client.mutation - .signInOneTimeToken( - parsedAnswers as unknown as SignInOneTimeTokenVariables, + .signInCrossOrigin( + parsedAnswers as unknown as SignInCrossOriginVariables, { select: selectFields, } as unknown as { - select: SignInOneTimeTokenPayloadSelect; + select: SignInCrossOriginPayloadSelect; } ) .execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { - console.error('Failed: signInOneTimeToken'); + console.error('Failed: signInCrossOrigin'); if (error instanceof Error) { console.error(error.message); } diff --git a/sdk/constructive-cli/src/auth/cli/commands/user-connected-account.ts b/sdk/constructive-cli/src/auth/cli/commands/user-connected-account.ts new file mode 100644 index 000000000..26fd78bcf --- /dev/null +++ b/sdk/constructive-cli/src/auth/cli/commands/user-connected-account.ts @@ -0,0 +1,204 @@ +/** + * CLI commands for UserConnectedAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer, extractFirst } from 'inquirerer'; +import { getClient } from '../executor'; +import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; +import type { FieldSchema } from '../utils'; +import type { + CreateUserConnectedAccountInput, + UserConnectedAccountPatch, + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + ownerId: 'uuid', + service: 'string', + identifier: 'string', + details: 'json', + isVerified: 'boolean', + createdAt: 'string', + updatedAt: 'string', +}; +const usage = + '\nuser-connected-account \n\nCommands:\n list List userConnectedAccount records\n find-first Find first matching userConnectedAccount record\n create Create a new userConnectedAccount\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + if (argv.help || argv.h) { + console.log(usage); + process.exit(0); + } + const { first: subcommand, newArgv } = extractFirst(argv); + if (!subcommand) { + const answer = await prompter.prompt(argv, [ + { + type: 'autocomplete', + name: 'subcommand', + message: 'What do you want to do?', + options: ['list', 'find-first', 'create'], + }, + ]); + return handleTableSubcommand(answer.subcommand as string, newArgv, prompter); + } + return handleTableSubcommand(subcommand, newArgv, prompter); +}; +async function handleTableSubcommand( + subcommand: string, + argv: Partial>, + prompter: Inquirerer +) { + switch (subcommand) { + case 'list': + return handleList(argv, prompter); + case 'find-first': + return handleFindFirst(argv, prompter); + case 'create': + return handleCreate(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + ownerId: true, + service: true, + identifier: true, + details: true, + isVerified: true, + createdAt: true, + updatedAt: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + > & { + select: UserConnectedAccountSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.userConnectedAccount.findMany(findManyArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to list records.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleFindFirst(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + ownerId: true, + service: true, + identifier: true, + details: true, + isVerified: true, + createdAt: true, + updatedAt: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: UserConnectedAccountSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.userConnectedAccount.findFirst(findFirstArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to find record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'ownerId', + message: 'ownerId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'service', + message: 'service', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'identifier', + message: 'identifier', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'details', + message: 'details', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'isVerified', + message: 'isVerified', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateUserConnectedAccountInput['userConnectedAccount']; + const client = getClient(); + const result = await client.userConnectedAccount + .create({ + data: { + ownerId: cleanedData.ownerId, + service: cleanedData.service, + identifier: cleanedData.identifier, + details: cleanedData.details, + isVerified: cleanedData.isVerified, + }, + select: { + id: true, + ownerId: true, + service: true, + identifier: true, + details: true, + isVerified: true, + createdAt: true, + updatedAt: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to create record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} diff --git a/sdk/constructive-cli/src/auth/orm/README.md b/sdk/constructive-cli/src/auth/orm/README.md index 4160a6350..9f1277067 100644 --- a/sdk/constructive-cli/src/auth/orm/README.md +++ b/sdk/constructive-cli/src/auth/orm/README.md @@ -24,9 +24,9 @@ const db = createClient({ | `email` | findMany, findOne, create, update, delete | | `phoneNumber` | findMany, findOne, create, update, delete | | `cryptoAddress` | findMany, findOne, create, update, delete | -| `connectedAccount` | findMany, findOne, create, update, delete | | `auditLog` | findMany, findOne, create, update, delete | | `roleType` | findMany, findOne, create, update, delete | +| `userConnectedAccount` | findMany, findOne, create, update, delete | | `user` | findMany, findOne, create, update, delete | ## Table Operations @@ -137,42 +137,6 @@ const updated = await db.cryptoAddress.update({ where: { id: '' }, data: { const deleted = await db.cryptoAddress.delete({ where: { id: '' } }).execute(); ``` -### `db.connectedAccount` - -CRUD operations for ConnectedAccount records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | UUID | No | -| `ownerId` | UUID | Yes | -| `service` | String | Yes | -| `identifier` | String | Yes | -| `details` | JSON | Yes | -| `isVerified` | Boolean | Yes | -| `createdAt` | Datetime | No | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all connectedAccount records -const items = await db.connectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.connectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Create -const created = await db.connectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.connectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.connectedAccount.delete({ where: { id: '' } }).execute(); -``` - ### `db.auditLog` CRUD operations for AuditLog records. @@ -239,6 +203,42 @@ const updated = await db.roleType.update({ where: { id: '' }, data: { name: const deleted = await db.roleType.delete({ where: { id: '' } }).execute(); ``` +### `db.userConnectedAccount` + +CRUD operations for UserConnectedAccount records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `ownerId` | UUID | Yes | +| `service` | String | Yes | +| `identifier` | String | Yes | +| `details` | JSON | Yes | +| `isVerified` | Boolean | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all userConnectedAccount records +const items = await db.userConnectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.userConnectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.userConnectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userConnectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userConnectedAccount.delete({ where: { id: '' } }).execute(); +``` + ### `db.user` CRUD operations for User records. @@ -283,26 +283,26 @@ const deleted = await db.user.delete({ where: { id: '' } }).execute(); ## Custom Operations -### `db.query.currentIpAddress` +### `db.query.currentUserAgent` -currentIpAddress +currentUserAgent - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentIpAddress().execute(); +const result = await db.query.currentUserAgent().execute(); ``` -### `db.query.currentUserAgent` +### `db.query.currentIpAddress` -currentUserAgent +currentIpAddress - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentUserAgent().execute(); +const result = await db.query.currentIpAddress().execute(); ``` ### `db.query.currentUserId` @@ -316,6 +316,21 @@ currentUserId const result = await db.query.currentUserId().execute(); ``` +### `db.query.requireStepUp` + +requireStepUp + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `stepUpType` | String | + +```typescript +const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); +``` + ### `db.query.currentUser` currentUser @@ -372,6 +387,51 @@ checkPassword const result = await db.mutation.checkPassword({ input: { password: '' } }).execute(); ``` +### `db.mutation.disconnectAccount` + +disconnectAccount + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DisconnectAccountInput (required) | + +```typescript +const result = await db.mutation.disconnectAccount({ input: { accountId: '' } }).execute(); +``` + +### `db.mutation.revokeApiKey` + +revokeApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeApiKeyInput (required) | + +```typescript +const result = await db.mutation.revokeApiKey({ input: { keyId: '' } }).execute(); +``` + +### `db.mutation.revokeSession` + +revokeSession + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeSessionInput (required) | + +```typescript +const result = await db.mutation.revokeSession({ input: { sessionId: '' } }).execute(); +``` + ### `db.mutation.verifyPassword` verifyPassword @@ -447,6 +507,21 @@ verifyEmail const result = await db.mutation.verifyEmail({ input: { emailId: '', token: '' } }).execute(); ``` +### `db.mutation.provisionNewUser` + +provisionNewUser + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionNewUserInput (required) | + +```typescript +const result = await db.mutation.provisionNewUser({ input: { email: '', password: '' } }).execute(); +``` + ### `db.mutation.resetPassword` resetPassword @@ -462,34 +537,34 @@ resetPassword const result = await db.mutation.resetPassword({ input: { roleId: '', resetToken: '', newPassword: '' } }).execute(); ``` -### `db.mutation.signInOneTimeToken` +### `db.mutation.createApiKey` -signInOneTimeToken +createApiKey - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInOneTimeTokenInput (required) | + | `input` | CreateApiKeyInput (required) | ```typescript -const result = await db.mutation.signInOneTimeToken({ input: { token: '', credentialKind: '' } }).execute(); +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }).execute(); ``` -### `db.mutation.signIn` +### `db.mutation.signInCrossOrigin` -signIn +signInCrossOrigin - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInInput (required) | + | `input` | SignInCrossOriginInput (required) | ```typescript -const result = await db.mutation.signIn({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.signInCrossOrigin({ input: { token: '', credentialKind: '' } }).execute(); ``` ### `db.mutation.signUp` @@ -507,19 +582,34 @@ signUp const result = await db.mutation.signUp({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); ``` -### `db.mutation.oneTimeToken` +### `db.mutation.requestCrossOriginToken` -oneTimeToken +requestCrossOriginToken - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | OneTimeTokenInput (required) | + | `input` | RequestCrossOriginTokenInput (required) | + +```typescript +const result = await db.mutation.requestCrossOriginToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +``` + +### `db.mutation.signIn` + +signIn + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SignInInput (required) | ```typescript -const result = await db.mutation.oneTimeToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +const result = await db.mutation.signIn({ input: '' }).execute(); ``` ### `db.mutation.extendTokenExpires` diff --git a/sdk/constructive-cli/src/auth/orm/index.ts b/sdk/constructive-cli/src/auth/orm/index.ts index 22c1490f8..295690ffe 100644 --- a/sdk/constructive-cli/src/auth/orm/index.ts +++ b/sdk/constructive-cli/src/auth/orm/index.ts @@ -8,9 +8,9 @@ import type { OrmClientConfig } from './client'; import { EmailModel } from './models/email'; import { PhoneNumberModel } from './models/phoneNumber'; import { CryptoAddressModel } from './models/cryptoAddress'; -import { ConnectedAccountModel } from './models/connectedAccount'; import { AuditLogModel } from './models/auditLog'; import { RoleTypeModel } from './models/roleType'; +import { UserConnectedAccountModel } from './models/userConnectedAccount'; import { UserModel } from './models/user'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; @@ -51,9 +51,9 @@ export function createClient(config: OrmClientConfig) { email: new EmailModel(client), phoneNumber: new PhoneNumberModel(client), cryptoAddress: new CryptoAddressModel(client), - connectedAccount: new ConnectedAccountModel(client), auditLog: new AuditLogModel(client), roleType: new RoleTypeModel(client), + userConnectedAccount: new UserConnectedAccountModel(client), user: new UserModel(client), query: createQueryOperations(client), mutation: createMutationOperations(client), diff --git a/sdk/constructive-cli/src/auth/orm/input-types.ts b/sdk/constructive-cli/src/auth/orm/input-types.ts index 968dafb03..563c6ae79 100644 --- a/sdk/constructive-cli/src/auth/orm/input-types.ts +++ b/sdk/constructive-cli/src/auth/orm/input-types.ts @@ -276,21 +276,6 @@ export interface CryptoAddress { createdAt?: string | null; updatedAt?: string | null; } -/** OAuth and social login connections linking external service accounts to users */ -export interface ConnectedAccount { - id: string; - ownerId?: string | null; - /** The service used, e.g. `twitter` or `github`. */ - service?: string | null; - /** A unique identifier for the user within the service */ - identifier?: string | null; - /** Additional profile details extracted from this login method */ - details?: Record | null; - /** Whether this connected account has been verified */ - isVerified?: boolean | null; - createdAt?: string | null; - updatedAt?: string | null; -} /** Append-only audit log of authentication events (sign-in, sign-up, password changes, etc.) */ export interface AuditLog { id: string; @@ -313,6 +298,16 @@ export interface RoleType { id: number; name?: string | null; } +export interface UserConnectedAccount { + id: string; + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; + createdAt?: string | null; + updatedAt?: string | null; +} export interface User { id: string; username?: string | null; @@ -351,28 +346,26 @@ export interface PhoneNumberRelations { export interface CryptoAddressRelations { owner?: User | null; } -export interface ConnectedAccountRelations { - owner?: User | null; -} export interface AuditLogRelations { actor?: User | null; } export interface RoleTypeRelations {} +export interface UserConnectedAccountRelations {} export interface UserRelations { roleType?: RoleType | null; ownedEmails?: ConnectionResult; ownedPhoneNumbers?: ConnectionResult; ownedCryptoAddresses?: ConnectionResult; - ownedConnectedAccounts?: ConnectionResult; auditLogsByActorId?: ConnectionResult; } // ============ Entity Types With Relations ============ export type EmailWithRelations = Email & EmailRelations; export type PhoneNumberWithRelations = PhoneNumber & PhoneNumberRelations; export type CryptoAddressWithRelations = CryptoAddress & CryptoAddressRelations; -export type ConnectedAccountWithRelations = ConnectedAccount & ConnectedAccountRelations; export type AuditLogWithRelations = AuditLog & AuditLogRelations; export type RoleTypeWithRelations = RoleType & RoleTypeRelations; +export type UserConnectedAccountWithRelations = UserConnectedAccount & + UserConnectedAccountRelations; export type UserWithRelations = User & UserRelations; // ============ Entity Select Types ============ export type EmailSelect = { @@ -412,19 +405,6 @@ export type CryptoAddressSelect = { select: UserSelect; }; }; -export type ConnectedAccountSelect = { - id?: boolean; - ownerId?: boolean; - service?: boolean; - identifier?: boolean; - details?: boolean; - isVerified?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - owner?: { - select: UserSelect; - }; -}; export type AuditLogSelect = { id?: boolean; event?: boolean; @@ -442,6 +422,16 @@ export type RoleTypeSelect = { id?: boolean; name?: boolean; }; +export type UserConnectedAccountSelect = { + id?: boolean; + ownerId?: boolean; + service?: boolean; + identifier?: boolean; + details?: boolean; + isVerified?: boolean; + createdAt?: boolean; + updatedAt?: boolean; +}; export type UserSelect = { id?: boolean; username?: boolean; @@ -475,12 +465,6 @@ export type UserSelect = { filter?: CryptoAddressFilter; orderBy?: CryptoAddressOrderBy[]; }; - ownedConnectedAccounts?: { - select: ConnectedAccountSelect; - first?: number; - filter?: ConnectedAccountFilter; - orderBy?: ConnectedAccountOrderBy[]; - }; auditLogsByActorId?: { select: AuditLogSelect; first?: number; @@ -563,32 +547,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} export interface AuditLogFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -629,6 +587,30 @@ export interface RoleTypeFilter { /** Negates the expression. */ not?: RoleTypeFilter; } +export interface UserConnectedAccountFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `service` field. */ + service?: StringFilter; + /** Filter by the object’s `identifier` field. */ + identifier?: StringFilter; + /** Filter by the object’s `details` field. */ + details?: JSONFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: UserConnectedAccountFilter[]; + /** Checks for any expressions in this list. */ + or?: UserConnectedAccountFilter[]; + /** Negates the expression. */ + not?: UserConnectedAccountFilter; +} export interface UserFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -666,10 +648,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `auditLogsByActorId` relation. */ auditLogsByActorId?: UserToManyAuditLogFilter; /** `auditLogsByActorId` exist. */ @@ -743,26 +721,6 @@ export type CryptoAddressOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ConnectedAccountOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SERVICE_ASC' - | 'SERVICE_DESC' - | 'IDENTIFIER_ASC' - | 'IDENTIFIER_DESC' - | 'DETAILS_ASC' - | 'DETAILS_DESC' - | 'IS_VERIFIED_ASC' - | 'IS_VERIFIED_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type AuditLogOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -791,6 +749,24 @@ export type RoleTypeOrderBy = | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC'; +export type UserConnectedAccountOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SERVICE_ASC' + | 'SERVICE_DESC' + | 'IDENTIFIER_ASC' + | 'IDENTIFIER_DESC' + | 'DETAILS_ASC' + | 'DETAILS_DESC' + | 'IS_VERIFIED_ASC' + | 'IS_VERIFIED_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type UserOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -892,32 +868,6 @@ export interface DeleteCryptoAddressInput { clientMutationId?: string; id: string; } -export interface CreateConnectedAccountInput { - clientMutationId?: string; - connectedAccount: { - ownerId?: string; - service: string; - identifier: string; - details: Record; - isVerified?: boolean; - }; -} -export interface ConnectedAccountPatch { - ownerId?: string | null; - service?: string | null; - identifier?: string | null; - details?: Record | null; - isVerified?: boolean | null; -} -export interface UpdateConnectedAccountInput { - clientMutationId?: string; - id: string; - connectedAccountPatch: ConnectedAccountPatch; -} -export interface DeleteConnectedAccountInput { - clientMutationId?: string; - id: string; -} export interface CreateAuditLogInput { clientMutationId?: string; auditLog: { @@ -964,6 +914,32 @@ export interface DeleteRoleTypeInput { clientMutationId?: string; id: number; } +export interface CreateUserConnectedAccountInput { + clientMutationId?: string; + userConnectedAccount: { + ownerId?: string; + service?: string; + identifier?: string; + details?: Record; + isVerified?: boolean; + }; +} +export interface UserConnectedAccountPatch { + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; +} +export interface UpdateUserConnectedAccountInput { + clientMutationId?: string; + id: string; + userConnectedAccountPatch: UserConnectedAccountPatch; +} +export interface DeleteUserConnectedAccountInput { + clientMutationId?: string; + id: string; +} export interface CreateUserInput { clientMutationId?: string; user: { @@ -995,7 +971,6 @@ export const connectionFieldsMap = { ownedEmails: 'Email', ownedPhoneNumbers: 'PhoneNumber', ownedCryptoAddresses: 'CryptoAddress', - ownedConnectedAccounts: 'ConnectedAccount', auditLogsByActorId: 'AuditLog', }, } as Record>; @@ -1010,6 +985,18 @@ export interface CheckPasswordInput { clientMutationId?: string; password?: string; } +export interface DisconnectAccountInput { + clientMutationId?: string; + accountId: string; +} +export interface RevokeApiKeyInput { + clientMutationId?: string; + keyId: string; +} +export interface RevokeSessionInput { + clientMutationId?: string; + sessionId: string; +} export interface VerifyPasswordInput { clientMutationId?: string; password: string; @@ -1033,18 +1020,29 @@ export interface VerifyEmailInput { emailId?: string; token?: string; } +export interface ProvisionNewUserInput { + clientMutationId?: string; + email?: string; + password?: string; +} export interface ResetPasswordInput { clientMutationId?: string; roleId?: string; resetToken?: string; newPassword?: string; } -export interface SignInOneTimeTokenInput { +export interface CreateApiKeyInput { + clientMutationId?: string; + keyName: string; + accessLevel?: string; + mfaLevel?: string; +} +export interface SignInCrossOriginInput { clientMutationId?: string; token?: string; credentialKind?: string; } -export interface SignInInput { +export interface SignUpInput { clientMutationId?: string; email?: string; password?: string; @@ -1052,20 +1050,21 @@ export interface SignInInput { credentialKind?: string; csrfToken?: string; } -export interface SignUpInput { +export interface RequestCrossOriginTokenInput { clientMutationId?: string; email?: string; password?: string; + origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; - credentialKind?: string; - csrfToken?: string; } -export interface OneTimeTokenInput { +export interface SignInInput { clientMutationId?: string; email?: string; password?: string; - origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; + credentialKind?: string; + csrfToken?: string; + deviceToken?: string; } export interface ExtendTokenExpiresInput { clientMutationId?: string; @@ -1396,15 +1395,6 @@ export interface UserToManyCryptoAddressFilter { /** Filters to entities where no related entity matches. */ none?: CryptoAddressFilter; } -/** A filter to be used against many `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface UserToManyConnectedAccountFilter { - /** Filters to entities where at least one related entity matches. */ - some?: ConnectedAccountFilter; - /** Filters to entities where every related entity matches. */ - every?: ConnectedAccountFilter; - /** Filters to entities where no related entity matches. */ - none?: ConnectedAccountFilter; -} /** A filter to be used against many `AuditLog` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyAuditLogFilter { /** Filters to entities where at least one related entity matches. */ @@ -1517,33 +1507,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -/** A filter to be used against `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} /** A filter to be used against `AuditLog` object types. All fields are combined with a logical ‘and.’ */ export interface AuditLogFilter { /** Filter by the object’s `id` field. */ @@ -1686,10 +1649,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `auditLogsByActorId` relation. */ auditLogsByActorId?: UserToManyAuditLogFilter; /** `auditLogsByActorId` exist. */ @@ -1783,41 +1742,6 @@ export interface StringFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: string; } -/** A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ */ -export interface JSONFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: Record; - /** Not equal to the specified value. */ - notEqualTo?: Record; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: Record; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: Record; - /** Included in the specified list. */ - in?: Record[]; - /** Not included in the specified list. */ - notIn?: Record[]; - /** Less than the specified value. */ - lessThan?: Record; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: Record; - /** Greater than the specified value. */ - greaterThan?: Record; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: Record; - /** Contains the specified JSON. */ - contains?: Record; - /** Contains the specified key. */ - containsKey?: string; - /** Contains all of the specified keys. */ - containsAllKeys?: string[]; - /** Contains any of the specified keys. */ - containsAnyKeys?: string[]; - /** Contained by the specified JSON. */ - containedBy?: Record; -} /** A filter to be used against InternetAddress fields. All fields are combined with a logical ‘and.’ */ export interface InternetAddressFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -1931,6 +1855,30 @@ export interface CheckPasswordPayload { export type CheckPasswordPayloadSelect = { clientMutationId?: boolean; }; +export interface DisconnectAccountPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DisconnectAccountPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeSessionPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeSessionPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface VerifyPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -1971,6 +1919,14 @@ export type VerifyEmailPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface ProvisionNewUserPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type ProvisionNewUserPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ResetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -1979,24 +1935,24 @@ export type ResetPasswordPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface SignInOneTimeTokenPayload { +export interface CreateApiKeyPayload { clientMutationId?: string | null; - result?: SignInOneTimeTokenRecord | null; + result?: CreateApiKeyRecord | null; } -export type SignInOneTimeTokenPayloadSelect = { +export type CreateApiKeyPayloadSelect = { clientMutationId?: boolean; result?: { - select: SignInOneTimeTokenRecordSelect; + select: CreateApiKeyRecordSelect; }; }; -export interface SignInPayload { +export interface SignInCrossOriginPayload { clientMutationId?: string | null; - result?: SignInRecord | null; + result?: SignInCrossOriginRecord | null; } -export type SignInPayloadSelect = { +export type SignInCrossOriginPayloadSelect = { clientMutationId?: boolean; result?: { - select: SignInRecordSelect; + select: SignInCrossOriginRecordSelect; }; }; export interface SignUpPayload { @@ -2009,14 +1965,24 @@ export type SignUpPayloadSelect = { select: SignUpRecordSelect; }; }; -export interface OneTimeTokenPayload { +export interface RequestCrossOriginTokenPayload { clientMutationId?: string | null; result?: string | null; } -export type OneTimeTokenPayloadSelect = { +export type RequestCrossOriginTokenPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SignInPayload { + clientMutationId?: string | null; + result?: SignInRecord | null; +} +export type SignInPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: SignInRecordSelect; + }; +}; export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -2230,51 +2196,6 @@ export type DeleteCryptoAddressPayloadSelect = { select: CryptoAddressEdgeSelect; }; }; -export interface CreateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was created by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type CreateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface UpdateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was updated by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type UpdateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface DeleteConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was deleted by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type DeleteConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; export interface CreateAuditLogPayload { clientMutationId?: string | null; /** The `AuditLog` that was created by this mutation. */ @@ -2365,6 +2286,17 @@ export type DeleteRoleTypePayloadSelect = { select: RoleTypeEdgeSelect; }; }; +export interface CreateUserConnectedAccountPayload { + clientMutationId?: string | null; + /** The `UserConnectedAccount` that was created by this mutation. */ + userConnectedAccount?: UserConnectedAccount | null; +} +export type CreateUserConnectedAccountPayloadSelect = { + clientMutationId?: boolean; + userConnectedAccount?: { + select: UserConnectedAccountSelect; + }; +}; export interface CreateUserPayload { clientMutationId?: string | null; /** The `User` that was created by this mutation. */ @@ -2410,7 +2342,15 @@ export type DeleteUserPayloadSelect = { select: UserEdgeSelect; }; }; -export interface SignInOneTimeTokenRecord { +export interface CreateApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; +} +export type CreateApiKeyRecordSelect = { + apiKey?: boolean; + keyId?: boolean; +}; +export interface SignInCrossOriginRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -2418,7 +2358,7 @@ export interface SignInOneTimeTokenRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInOneTimeTokenRecordSelect = { +export type SignInCrossOriginRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -2426,7 +2366,7 @@ export type SignInOneTimeTokenRecordSelect = { isVerified?: boolean; totpEnabled?: boolean; }; -export interface SignInRecord { +export interface SignUpRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -2434,7 +2374,7 @@ export interface SignInRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInRecordSelect = { +export type SignUpRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -2442,21 +2382,25 @@ export type SignInRecordSelect = { isVerified?: boolean; totpEnabled?: boolean; }; -export interface SignUpRecord { +export interface SignInRecord { id?: string | null; userId?: string | null; accessToken?: string | null; accessTokenExpiresAt?: string | null; isVerified?: boolean | null; totpEnabled?: boolean | null; + mfaRequired?: boolean | null; + mfaChallengeToken?: string | null; } -export type SignUpRecordSelect = { +export type SignInRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; accessTokenExpiresAt?: boolean; isVerified?: boolean; totpEnabled?: boolean; + mfaRequired?: boolean; + mfaChallengeToken?: boolean; }; export interface ExtendTokenExpiresRecord { id?: string | null; @@ -2504,18 +2448,6 @@ export type CryptoAddressEdgeSelect = { select: CryptoAddressSelect; }; }; -/** A `ConnectedAccount` edge in the connection. */ -export interface ConnectedAccountEdge { - cursor?: string | null; - /** The `ConnectedAccount` at the end of the edge. */ - node?: ConnectedAccount | null; -} -export type ConnectedAccountEdgeSelect = { - cursor?: boolean; - node?: { - select: ConnectedAccountSelect; - }; -}; /** A `AuditLog` edge in the connection. */ export interface AuditLogEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/auth/orm/models/index.ts b/sdk/constructive-cli/src/auth/orm/models/index.ts index c21f0cd77..4e1b0adfe 100644 --- a/sdk/constructive-cli/src/auth/orm/models/index.ts +++ b/sdk/constructive-cli/src/auth/orm/models/index.ts @@ -6,7 +6,7 @@ export { EmailModel } from './email'; export { PhoneNumberModel } from './phoneNumber'; export { CryptoAddressModel } from './cryptoAddress'; -export { ConnectedAccountModel } from './connectedAccount'; export { AuditLogModel } from './auditLog'; export { RoleTypeModel } from './roleType'; +export { UserConnectedAccountModel } from './userConnectedAccount'; export { UserModel } from './user'; diff --git a/sdk/constructive-cli/src/auth/orm/models/userConnectedAccount.ts b/sdk/constructive-cli/src/auth/orm/models/userConnectedAccount.ts new file mode 100644 index 000000000..45bbea7f4 --- /dev/null +++ b/sdk/constructive-cli/src/auth/orm/models/userConnectedAccount.ts @@ -0,0 +1,169 @@ +/** + * UserConnectedAccount model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + UserConnectedAccount, + UserConnectedAccountWithRelations, + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, + CreateUserConnectedAccountInput, + UpdateUserConnectedAccountInput, + UserConnectedAccountPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserConnectedAccountModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + }, + 'UserConnectedAccountFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccount: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccount', + document, + variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserConnectedAccount: { + userConnectedAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserConnectedAccount', + 'createUserConnectedAccount', + 'userConnectedAccount', + args.select, + args.data, + 'CreateUserConnectedAccountInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserConnectedAccount', + fieldName: 'createUserConnectedAccount', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/auth/orm/mutation/index.ts b/sdk/constructive-cli/src/auth/orm/mutation/index.ts index d3e0d4862..c8f543ad7 100644 --- a/sdk/constructive-cli/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/auth/orm/mutation/index.ts @@ -10,16 +10,21 @@ import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, + DisconnectAccountInput, + RevokeApiKeyInput, + RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, + ProvisionNewUserInput, ResetPasswordInput, - SignInOneTimeTokenInput, - SignInInput, + CreateApiKeyInput, + SignInCrossOriginInput, SignUpInput, - OneTimeTokenInput, + RequestCrossOriginTokenInput, + SignInInput, ExtendTokenExpiresInput, ForgotPasswordInput, SendVerificationEmailInput, @@ -29,16 +34,21 @@ import type { SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, + DisconnectAccountPayload, + RevokeApiKeyPayload, + RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, + ProvisionNewUserPayload, ResetPasswordPayload, - SignInOneTimeTokenPayload, - SignInPayload, + CreateApiKeyPayload, + SignInCrossOriginPayload, SignUpPayload, - OneTimeTokenPayload, + RequestCrossOriginTokenPayload, + SignInPayload, ExtendTokenExpiresPayload, ForgotPasswordPayload, SendVerificationEmailPayload, @@ -48,16 +58,21 @@ import type { SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, + DisconnectAccountPayloadSelect, + RevokeApiKeyPayloadSelect, + RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, + ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, - SignInOneTimeTokenPayloadSelect, - SignInPayloadSelect, + CreateApiKeyPayloadSelect, + SignInCrossOriginPayloadSelect, SignUpPayloadSelect, - OneTimeTokenPayloadSelect, + RequestCrossOriginTokenPayloadSelect, + SignInPayloadSelect, ExtendTokenExpiresPayloadSelect, ForgotPasswordPayloadSelect, SendVerificationEmailPayloadSelect, @@ -75,6 +90,15 @@ export interface SendAccountDeletionEmailVariables { export interface CheckPasswordVariables { input: CheckPasswordInput; } +export interface DisconnectAccountVariables { + input: DisconnectAccountInput; +} +export interface RevokeApiKeyVariables { + input: RevokeApiKeyInput; +} +export interface RevokeSessionVariables { + input: RevokeSessionInput; +} export interface VerifyPasswordVariables { input: VerifyPasswordInput; } @@ -90,20 +114,26 @@ export interface SetPasswordVariables { export interface VerifyEmailVariables { input: VerifyEmailInput; } +export interface ProvisionNewUserVariables { + input: ProvisionNewUserInput; +} export interface ResetPasswordVariables { input: ResetPasswordInput; } -export interface SignInOneTimeTokenVariables { - input: SignInOneTimeTokenInput; +export interface CreateApiKeyVariables { + input: CreateApiKeyInput; } -export interface SignInVariables { - input: SignInInput; +export interface SignInCrossOriginVariables { + input: SignInCrossOriginInput; } export interface SignUpVariables { input: SignUpInput; } -export interface OneTimeTokenVariables { - input: OneTimeTokenInput; +export interface RequestCrossOriginTokenVariables { + input: RequestCrossOriginTokenInput; +} +export interface SignInVariables { + input: SignInInput; } export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; @@ -232,6 +262,93 @@ export function createMutationOperations(client: OrmClient) { 'CheckPasswordPayload' ), }), + disconnectAccount: ( + args: DisconnectAccountVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + disconnectAccount: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'DisconnectAccount', + fieldName: 'disconnectAccount', + ...buildCustomDocument( + 'mutation', + 'DisconnectAccount', + 'disconnectAccount', + options.select, + args, + [ + { + name: 'input', + type: 'DisconnectAccountInput!', + }, + ], + connectionFieldsMap, + 'DisconnectAccountPayload' + ), + }), + revokeApiKey: ( + args: RevokeApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeApiKey', + fieldName: 'revokeApiKey', + ...buildCustomDocument( + 'mutation', + 'RevokeApiKey', + 'revokeApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeApiKeyInput!', + }, + ], + connectionFieldsMap, + 'RevokeApiKeyPayload' + ), + }), + revokeSession: ( + args: RevokeSessionVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeSession: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeSession', + fieldName: 'revokeSession', + ...buildCustomDocument( + 'mutation', + 'RevokeSession', + 'revokeSession', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeSessionInput!', + }, + ], + connectionFieldsMap, + 'RevokeSessionPayload' + ), + }), verifyPassword: ( args: VerifyPasswordVariables, options: { @@ -377,6 +494,35 @@ export function createMutationOperations(client: OrmClient) { 'VerifyEmailPayload' ), }), + provisionNewUser: ( + args: ProvisionNewUserVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + provisionNewUser: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ProvisionNewUser', + fieldName: 'provisionNewUser', + ...buildCustomDocument( + 'mutation', + 'ProvisionNewUser', + 'provisionNewUser', + options.select, + args, + [ + { + name: 'input', + type: 'ProvisionNewUserInput!', + }, + ], + connectionFieldsMap, + 'ProvisionNewUserPayload' + ), + }), resetPassword: ( args: ResetPasswordVariables, options: { @@ -406,62 +552,62 @@ export function createMutationOperations(client: OrmClient) { 'ResetPasswordPayload' ), }), - signInOneTimeToken: ( - args: SignInOneTimeTokenVariables, + createApiKey: ( + args: CreateApiKeyVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signInOneTimeToken: InferSelectResult | null; + createApiKey: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignInOneTimeToken', - fieldName: 'signInOneTimeToken', + operationName: 'CreateApiKey', + fieldName: 'createApiKey', ...buildCustomDocument( 'mutation', - 'SignInOneTimeToken', - 'signInOneTimeToken', + 'CreateApiKey', + 'createApiKey', options.select, args, [ { name: 'input', - type: 'SignInOneTimeTokenInput!', + type: 'CreateApiKeyInput!', }, ], connectionFieldsMap, - 'SignInOneTimeTokenPayload' + 'CreateApiKeyPayload' ), }), - signIn: ( - args: SignInVariables, + signInCrossOrigin: ( + args: SignInCrossOriginVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signIn: InferSelectResult | null; + signInCrossOrigin: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignIn', - fieldName: 'signIn', + operationName: 'SignInCrossOrigin', + fieldName: 'signInCrossOrigin', ...buildCustomDocument( 'mutation', - 'SignIn', - 'signIn', + 'SignInCrossOrigin', + 'signInCrossOrigin', options.select, args, [ { name: 'input', - type: 'SignInInput!', + type: 'SignInCrossOriginInput!', }, ], connectionFieldsMap, - 'SignInPayload' + 'SignInCrossOriginPayload' ), }), signUp: ( @@ -493,33 +639,62 @@ export function createMutationOperations(client: OrmClient) { 'SignUpPayload' ), }), - oneTimeToken: ( - args: OneTimeTokenVariables, + requestCrossOriginToken: ( + args: RequestCrossOriginTokenVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + requestCrossOriginToken: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RequestCrossOriginToken', + fieldName: 'requestCrossOriginToken', + ...buildCustomDocument( + 'mutation', + 'RequestCrossOriginToken', + 'requestCrossOriginToken', + options.select, + args, + [ + { + name: 'input', + type: 'RequestCrossOriginTokenInput!', + }, + ], + connectionFieldsMap, + 'RequestCrossOriginTokenPayload' + ), + }), + signIn: ( + args: SignInVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - oneTimeToken: InferSelectResult | null; + signIn: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'OneTimeToken', - fieldName: 'oneTimeToken', + operationName: 'SignIn', + fieldName: 'signIn', ...buildCustomDocument( 'mutation', - 'OneTimeToken', - 'oneTimeToken', + 'SignIn', + 'signIn', options.select, args, [ { name: 'input', - type: 'OneTimeTokenInput!', + type: 'SignInInput!', }, ], connectionFieldsMap, - 'OneTimeTokenPayload' + 'SignInPayload' ), }), extendTokenExpires: ( diff --git a/sdk/constructive-cli/src/auth/orm/query/index.ts b/sdk/constructive-cli/src/auth/orm/query/index.ts index 69150c6c7..408632294 100644 --- a/sdk/constructive-cli/src/auth/orm/query/index.ts +++ b/sdk/constructive-cli/src/auth/orm/query/index.ts @@ -8,20 +8,23 @@ import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; import type { User, UserSelect } from '../input-types'; import { connectionFieldsMap } from '../input-types'; +export interface RequireStepUpVariables { + stepUpType?: string; +} export function createQueryOperations(client: OrmClient) { return { - currentIpAddress: (options?: { select?: Record }) => + currentUserAgent: (options?: { select?: Record }) => new QueryBuilder<{ - currentIpAddress: string | null; + currentUserAgent: string | null; }>({ client, operation: 'query', - operationName: 'CurrentIpAddress', - fieldName: 'currentIpAddress', + operationName: 'CurrentUserAgent', + fieldName: 'currentUserAgent', ...buildCustomDocument( 'query', - 'CurrentIpAddress', - 'currentIpAddress', + 'CurrentUserAgent', + 'currentUserAgent', options?.select, undefined, [], @@ -29,18 +32,18 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentUserAgent: (options?: { select?: Record }) => + currentIpAddress: (options?: { select?: Record }) => new QueryBuilder<{ - currentUserAgent: string | null; + currentIpAddress: string | null; }>({ client, operation: 'query', - operationName: 'CurrentUserAgent', - fieldName: 'currentUserAgent', + operationName: 'CurrentIpAddress', + fieldName: 'currentIpAddress', ...buildCustomDocument( 'query', - 'CurrentUserAgent', - 'currentUserAgent', + 'CurrentIpAddress', + 'currentIpAddress', options?.select, undefined, [], @@ -67,6 +70,35 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + requireStepUp: ( + args: RequireStepUpVariables, + options?: { + select?: Record; + } + ) => + new QueryBuilder<{ + requireStepUp: boolean | null; + }>({ + client, + operation: 'query', + operationName: 'RequireStepUp', + fieldName: 'requireStepUp', + ...buildCustomDocument( + 'query', + 'RequireStepUp', + 'requireStepUp', + options?.select, + args, + [ + { + name: 'stepUpType', + type: 'String', + }, + ], + connectionFieldsMap, + undefined + ), + }), currentUser: ( options: { select: S; diff --git a/sdk/constructive-cli/src/public/README.md b/sdk/constructive-cli/src/public/README.md index 92faa481f..f6d325522 100644 --- a/sdk/constructive-cli/src/public/README.md +++ b/sdk/constructive-cli/src/public/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 109 -- **Custom queries:** 20 -- **Custom mutations:** 44 +- **Tables:** 114 +- **Custom queries:** 22 +- **Custom mutations:** 50 **Generators:** ORM, CLI diff --git a/sdk/constructive-cli/src/public/cli/README.md b/sdk/constructive-cli/src/public/cli/README.md index 1c4d734ba..ecebcfe07 100644 --- a/sdk/constructive-cli/src/public/cli/README.md +++ b/sdk/constructive-cli/src/public/cli/README.md @@ -38,6 +38,7 @@ csdk auth set-token | `table` | table CRUD operations | | `check-constraint` | checkConstraint CRUD operations | | `field` | field CRUD operations | +| `spatial-relation` | spatialRelation CRUD operations | | `foreign-key-constraint` | foreignKeyConstraint CRUD operations | | `full-text-search` | fullTextSearch CRUD operations | | `index` | index CRUD operations | @@ -51,9 +52,9 @@ csdk auth set-token | `view-grant` | viewGrant CRUD operations | | `view-rule` | viewRule CRUD operations | | `embedding-chunk` | embeddingChunk CRUD operations | -| `table-template-module` | tableTemplateModule CRUD operations | | `secure-table-provision` | secureTableProvision CRUD operations | | `relation-provision` | relationProvision CRUD operations | +| `session-secrets-module` | sessionSecretsModule CRUD operations | | `schema-grant` | schemaGrant CRUD operations | | `default-privilege` | defaultPrivilege CRUD operations | | `enum` | enum CRUD operations | @@ -91,6 +92,8 @@ csdk auth set-token | `blueprint-template` | blueprintTemplate CRUD operations | | `blueprint-construction` | blueprintConstruction CRUD operations | | `storage-module` | storageModule CRUD operations | +| `entity-type-provision` | entityTypeProvision CRUD operations | +| `webauthn-credentials-module` | webauthnCredentialsModule CRUD operations | | `database-provision-module` | databaseProvisionModule CRUD operations | | `app-admin-grant` | appAdminGrant CRUD operations | | `app-owner-grant` | appOwnerGrant CRUD operations | @@ -99,6 +102,7 @@ csdk auth set-token | `org-member` | orgMember CRUD operations | | `org-admin-grant` | orgAdminGrant CRUD operations | | `org-owner-grant` | orgOwnerGrant CRUD operations | +| `org-member-profile` | orgMemberProfile CRUD operations | | `org-grant` | orgGrant CRUD operations | | `org-chart-edge` | orgChartEdge CRUD operations | | `org-chart-edge-grant` | orgChartEdgeGrant CRUD operations | @@ -111,7 +115,6 @@ csdk auth set-token | `email` | email CRUD operations | | `phone-number` | phoneNumber CRUD operations | | `crypto-address` | cryptoAddress CRUD operations | -| `connected-account` | connectedAccount CRUD operations | | `app-invite` | appInvite CRUD operations | | `app-claimed-invite` | appClaimedInvite CRUD operations | | `org-invite` | orgInvite CRUD operations | @@ -124,10 +127,12 @@ csdk auth set-token | `migrate-file` | migrateFile CRUD operations | | `app-limit-default` | appLimitDefault CRUD operations | | `org-limit-default` | orgLimitDefault CRUD operations | -| `membership-type` | membershipType CRUD operations | +| `devices-module` | devicesModule CRUD operations | +| `user-connected-account` | userConnectedAccount CRUD operations | | `app-membership-default` | appMembershipDefault CRUD operations | | `commit` | commit CRUD operations | | `rate-limits-module` | rateLimitsModule CRUD operations | +| `membership-type` | membershipType CRUD operations | | `org-membership-default` | orgMembershipDefault CRUD operations | | `rls-module` | rlsModule CRUD operations | | `sql-action` | sqlAction CRUD operations | @@ -136,12 +141,14 @@ csdk auth set-token | `app-membership` | appMembership CRUD operations | | `hierarchy-module` | hierarchyModule CRUD operations | | `current-user-id` | currentUserId | -| `current-ip-address` | currentIpAddress | | `current-user-agent` | currentUserAgent | +| `current-ip-address` | currentIpAddress | +| `require-step-up` | requireStepUp | | `app-permissions-get-padded-mask` | appPermissionsGetPaddedMask | | `org-permissions-get-padded-mask` | orgPermissionsGetPaddedMask | | `steps-achieved` | stepsAchieved | | `rev-parse` | revParse | +| `resolve-blueprint-field` | Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. | | `org-is-manager-of` | orgIsManagerOf | | `app-permissions-get-mask` | appPermissionsGetMask | | `org-permissions-get-mask` | orgPermissionsGetMask | @@ -160,6 +167,9 @@ csdk auth set-token | `accept-database-transfer` | acceptDatabaseTransfer | | `cancel-database-transfer` | cancelDatabaseTransfer | | `reject-database-transfer` | rejectDatabaseTransfer | +| `disconnect-account` | disconnectAccount | +| `revoke-api-key` | revokeApiKey | +| `revoke-session` | revokeSession | | `verify-password` | verifyPassword | | `verify-totp` | verifyTotp | | `submit-app-invite-code` | submitAppInviteCode | @@ -170,10 +180,13 @@ csdk auth set-token | `verify-email` | verifyEmail | | `freeze-objects` | freezeObjects | | `init-empty-repo` | initEmptyRepo | -| `construct-blueprint` | Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. | +| `construct-blueprint` | 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. | +| `provision-new-user` | provisionNewUser | | `reset-password` | resetPassword | | `remove-node-at-path` | removeNodeAtPath | | `copy-template-to-blueprint` | 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. | +| `create-api-key` | createApiKey | +| `provision-spatial-relation` | Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. | | `bootstrap-user` | bootstrapUser | | `set-field-order` | setFieldOrder | | `provision-unique-constraint` | Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists. | @@ -187,7 +200,7 @@ csdk auth set-token | `set-and-commit` | setAndCommit | | `provision-relation` | Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id). | | `apply-rls` | applyRls | -| `sign-in-one-time-token` | signInOneTimeToken | +| `sign-in-cross-origin` | signInCrossOrigin | | `create-user-database` | Creates a new user database with all required modules, permissions, and RLS policies. Parameters: @@ -206,9 +219,9 @@ Example usage: SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups | | `extend-token-expires` | extendTokenExpires | -| `sign-in` | signIn | | `sign-up` | signUp | -| `one-time-token` | oneTimeToken | +| `request-cross-origin-token` | requestCrossOriginToken | +| `sign-in` | signIn | | `provision-table` | Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields). | | `send-verification-email` | sendVerificationEmail | | `forgot-password` | forgotPassword | @@ -622,6 +635,42 @@ CRUD operations for Field records. **Required create fields:** `tableId`, `name`, `type` **Optional create fields (backend defaults):** `databaseId`, `label`, `description`, `smartTags`, `isRequired`, `apiRequired`, `defaultValue`, `defaultValueAst`, `fieldOrder`, `regexp`, `chk`, `chkExpr`, `min`, `max`, `tags`, `category`, `module`, `scope` +### `spatial-relation` + +CRUD operations for SpatialRelation records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all spatialRelation records | +| `find-first` | Find first matching spatialRelation record | +| `get` | Get a spatialRelation by id | +| `create` | Create a new spatialRelation | +| `update` | Update an existing spatialRelation | +| `delete` | Delete a spatialRelation | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `databaseId` | UUID | +| `tableId` | UUID | +| `fieldId` | UUID | +| `refTableId` | UUID | +| `refFieldId` | UUID | +| `name` | String | +| `operator` | String | +| `paramName` | String | +| `category` | ObjectCategory | +| `module` | String | +| `scope` | Int | +| `tags` | String | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | + +**Required create fields:** `tableId`, `fieldId`, `refTableId`, `refFieldId`, `name`, `operator` +**Optional create fields (backend defaults):** `databaseId`, `paramName`, `category`, `module`, `scope`, `tags` + ### `foreign-key-constraint` CRUD operations for ForeignKeyConstraint records. @@ -1058,36 +1107,6 @@ CRUD operations for EmbeddingChunk records. **Required create fields:** `tableId` **Optional create fields (backend defaults):** `databaseId`, `embeddingFieldId`, `chunksTableId`, `chunksTableName`, `contentFieldName`, `dimensions`, `metric`, `chunkSize`, `chunkOverlap`, `chunkStrategy`, `metadataFields`, `enqueueChunkingJob`, `chunkingTaskName`, `parentFkFieldId` -### `table-template-module` - -CRUD operations for TableTemplateModule records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all tableTemplateModule records | -| `find-first` | Find first matching tableTemplateModule record | -| `get` | Get a tableTemplateModule by id | -| `create` | Create a new tableTemplateModule | -| `update` | Update an existing tableTemplateModule | -| `delete` | Delete a tableTemplateModule | - -**Fields:** - -| Field | Type | -|-------|------| -| `id` | UUID | -| `databaseId` | UUID | -| `schemaId` | UUID | -| `privateSchemaId` | UUID | -| `tableId` | UUID | -| `ownerTableId` | UUID | -| `tableName` | String | -| `nodeType` | String | -| `data` | JSON | - -**Required create fields:** `databaseId`, `tableName`, `nodeType` -**Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `tableId`, `ownerTableId`, `data` - ### `secure-table-provision` CRUD operations for SecureTableProvision records. @@ -1177,6 +1196,33 @@ CRUD operations for RelationProvision records. **Required create fields:** `databaseId`, `relationType`, `sourceTableId`, `targetTableId` **Optional create fields (backend defaults):** `fieldName`, `deleteAction`, `isRequired`, `apiRequired`, `junctionTableId`, `junctionTableName`, `junctionSchemaId`, `sourceFieldName`, `targetFieldName`, `useCompositeKey`, `createIndex`, `exposeInApi`, `nodes`, `grantRoles`, `grantPrivileges`, `policyType`, `policyPrivileges`, `policyRole`, `policyPermissive`, `policyName`, `policyData`, `outFieldId`, `outJunctionTableId`, `outSourceFieldId`, `outTargetFieldId` +### `session-secrets-module` + +CRUD operations for SessionSecretsModule records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all sessionSecretsModule records | +| `find-first` | Find first matching sessionSecretsModule record | +| `get` | Get a sessionSecretsModule by id | +| `create` | Create a new sessionSecretsModule | +| `update` | Update an existing sessionSecretsModule | +| `delete` | Delete a sessionSecretsModule | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `databaseId` | UUID | +| `schemaId` | UUID | +| `tableId` | UUID | +| `tableName` | String | +| `sessionsTableId` | UUID | + +**Required create fields:** `databaseId` +**Optional create fields (backend defaults):** `schemaId`, `tableId`, `tableName`, `sessionsTableId` + ### `schema-grant` CRUD operations for SchemaGrant records. @@ -1963,9 +2009,10 @@ CRUD operations for MembershipsModule records. | `entityIdsByMask` | String | | `entityIdsByPerm` | String | | `entityIdsFunction` | String | +| `memberProfilesTableId` | UUID | **Required create fields:** `databaseId`, `membershipType` -**Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `membershipsTableId`, `membershipsTableName`, `membersTableId`, `membersTableName`, `membershipDefaultsTableId`, `membershipDefaultsTableName`, `grantsTableId`, `grantsTableName`, `actorTableId`, `limitsTableId`, `defaultLimitsTableId`, `permissionsTableId`, `defaultPermissionsTableId`, `sprtTableId`, `adminGrantsTableId`, `adminGrantsTableName`, `ownerGrantsTableId`, `ownerGrantsTableName`, `entityTableId`, `entityTableOwnerId`, `prefix`, `actorMaskCheck`, `actorPermCheck`, `entityIdsByMask`, `entityIdsByPerm`, `entityIdsFunction` +**Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `membershipsTableId`, `membershipsTableName`, `membersTableId`, `membersTableName`, `membershipDefaultsTableId`, `membershipDefaultsTableName`, `grantsTableId`, `grantsTableName`, `actorTableId`, `limitsTableId`, `defaultLimitsTableId`, `permissionsTableId`, `defaultPermissionsTableId`, `sprtTableId`, `adminGrantsTableId`, `adminGrantsTableName`, `ownerGrantsTableId`, `ownerGrantsTableName`, `entityTableId`, `entityTableOwnerId`, `prefix`, `actorMaskCheck`, `actorPermCheck`, `entityIdsByMask`, `entityIdsByPerm`, `entityIdsFunction`, `memberProfilesTableId` ### `permissions-module` @@ -2170,12 +2217,12 @@ CRUD operations for UserAuthModule records. | `checkPasswordFunction` | String | | `sendAccountDeletionEmailFunction` | String | | `deleteAccountFunction` | String | -| `signInOneTimeTokenFunction` | String | -| `oneTimeTokenFunction` | String | +| `signInCrossOriginFunction` | String | +| `requestCrossOriginTokenFunction` | String | | `extendTokenExpires` | String | **Required create fields:** `databaseId` -**Optional create fields (backend defaults):** `schemaId`, `emailsTableId`, `usersTableId`, `secretsTableId`, `encryptedTableId`, `sessionsTableId`, `sessionCredentialsTableId`, `auditsTableId`, `auditsTableName`, `signInFunction`, `signUpFunction`, `signOutFunction`, `setPasswordFunction`, `resetPasswordFunction`, `forgotPasswordFunction`, `sendVerificationEmailFunction`, `verifyEmailFunction`, `verifyPasswordFunction`, `checkPasswordFunction`, `sendAccountDeletionEmailFunction`, `deleteAccountFunction`, `signInOneTimeTokenFunction`, `oneTimeTokenFunction`, `extendTokenExpires` +**Optional create fields (backend defaults):** `schemaId`, `emailsTableId`, `usersTableId`, `secretsTableId`, `encryptedTableId`, `sessionsTableId`, `sessionCredentialsTableId`, `auditsTableId`, `auditsTableName`, `signInFunction`, `signUpFunction`, `signOutFunction`, `setPasswordFunction`, `resetPasswordFunction`, `forgotPasswordFunction`, `sendVerificationEmailFunction`, `verifyEmailFunction`, `verifyPasswordFunction`, `checkPasswordFunction`, `sendAccountDeletionEmailFunction`, `deleteAccountFunction`, `signInCrossOriginFunction`, `requestCrossOriginTokenFunction`, `extendTokenExpires` ### `users-module` @@ -2352,6 +2399,72 @@ CRUD operations for StorageModule records. **Required create fields:** `databaseId` **Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `bucketsTableId`, `filesTableId`, `uploadRequestsTableId`, `bucketsTableName`, `filesTableName`, `uploadRequestsTableName`, `entityTableId`, `endpoint`, `publicUrlPrefix`, `provider`, `allowedOrigins`, `uploadUrlExpirySeconds`, `downloadUrlExpirySeconds`, `defaultMaxFileSize`, `maxFilenameLength`, `cacheTtlSeconds` +### `entity-type-provision` + +CRUD operations for EntityTypeProvision records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all entityTypeProvision records | +| `find-first` | Find first matching entityTypeProvision record | +| `get` | Get a entityTypeProvision by id | +| `create` | Create a new entityTypeProvision | +| `update` | Update an existing entityTypeProvision | +| `delete` | Delete a entityTypeProvision | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `databaseId` | UUID | +| `name` | String | +| `prefix` | String | +| `description` | String | +| `parentEntity` | String | +| `tableName` | String | +| `isVisible` | Boolean | +| `hasLimits` | Boolean | +| `hasProfiles` | Boolean | +| `hasLevels` | Boolean | +| `skipEntityPolicies` | Boolean | +| `tableProvision` | JSON | +| `outMembershipType` | Int | +| `outEntityTableId` | UUID | +| `outEntityTableName` | String | +| `outInstalledModules` | String | + +**Required create fields:** `databaseId`, `name`, `prefix` +**Optional create fields (backend defaults):** `description`, `parentEntity`, `tableName`, `isVisible`, `hasLimits`, `hasProfiles`, `hasLevels`, `skipEntityPolicies`, `tableProvision`, `outMembershipType`, `outEntityTableId`, `outEntityTableName`, `outInstalledModules` + +### `webauthn-credentials-module` + +CRUD operations for WebauthnCredentialsModule records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all webauthnCredentialsModule records | +| `find-first` | Find first matching webauthnCredentialsModule record | +| `get` | Get a webauthnCredentialsModule by id | +| `create` | Create a new webauthnCredentialsModule | +| `update` | Update an existing webauthnCredentialsModule | +| `delete` | Delete a webauthnCredentialsModule | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `databaseId` | UUID | +| `schemaId` | UUID | +| `privateSchemaId` | UUID | +| `tableId` | UUID | +| `ownerTableId` | UUID | +| `tableName` | String | + +**Required create fields:** `databaseId` +**Optional create fields (backend defaults):** `schemaId`, `privateSchemaId`, `tableId`, `ownerTableId`, `tableName` + ### `database-provision-module` CRUD operations for DatabaseProvisionModule records. @@ -2495,16 +2608,18 @@ CRUD operations for OrgMembership records. | `isBanned` | Boolean | | `isDisabled` | Boolean | | `isActive` | Boolean | +| `isExternal` | Boolean | | `isOwner` | Boolean | | `isAdmin` | Boolean | | `permissions` | BitString | | `granted` | BitString | | `actorId` | UUID | | `entityId` | UUID | +| `isReadOnly` | Boolean | | `profileId` | UUID | **Required create fields:** `actorId`, `entityId` -**Optional create fields (backend defaults):** `createdBy`, `updatedBy`, `isApproved`, `isBanned`, `isDisabled`, `isActive`, `isOwner`, `isAdmin`, `permissions`, `granted`, `profileId` +**Optional create fields (backend defaults):** `createdBy`, `updatedBy`, `isApproved`, `isBanned`, `isDisabled`, `isActive`, `isExternal`, `isOwner`, `isAdmin`, `permissions`, `granted`, `isReadOnly`, `profileId` ### `org-member` @@ -2587,6 +2702,38 @@ CRUD operations for OrgOwnerGrant records. **Required create fields:** `actorId`, `entityId` **Optional create fields (backend defaults):** `isGrant`, `grantorId` +### `org-member-profile` + +CRUD operations for OrgMemberProfile records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all orgMemberProfile records | +| `find-first` | Find first matching orgMemberProfile record | +| `get` | Get a orgMemberProfile by id | +| `create` | Create a new orgMemberProfile | +| `update` | Update an existing orgMemberProfile | +| `delete` | Delete a orgMemberProfile | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | +| `membershipId` | UUID | +| `entityId` | UUID | +| `actorId` | UUID | +| `displayName` | String | +| `email` | String | +| `title` | String | +| `bio` | String | +| `profilePicture` | Image | + +**Required create fields:** `membershipId`, `entityId`, `actorId` +**Optional create fields (backend defaults):** `displayName`, `email`, `title`, `bio`, `profilePicture` + ### `org-grant` CRUD operations for OrgGrant records. @@ -2919,35 +3066,6 @@ CRUD operations for CryptoAddress records. **Required create fields:** `address` **Optional create fields (backend defaults):** `ownerId`, `isVerified`, `isPrimary` -### `connected-account` - -CRUD operations for ConnectedAccount records. - -| Subcommand | Description | -|------------|-------------| -| `list` | List all connectedAccount records | -| `find-first` | Find first matching connectedAccount record | -| `get` | Get a connectedAccount by id | -| `create` | Create a new connectedAccount | -| `update` | Update an existing connectedAccount | -| `delete` | Delete a connectedAccount | - -**Fields:** - -| Field | Type | -|-------|------| -| `id` | UUID | -| `ownerId` | UUID | -| `service` | String | -| `identifier` | String | -| `details` | JSON | -| `isVerified` | Boolean | -| `createdAt` | Datetime | -| `updatedAt` | Datetime | - -**Required create fields:** `service`, `identifier`, `details` -**Optional create fields (backend defaults):** `ownerId`, `isVerified` - ### `app-invite` CRUD operations for AppInvite records. @@ -3265,29 +3383,61 @@ CRUD operations for OrgLimitDefault records. **Required create fields:** `name` **Optional create fields (backend defaults):** `max` -### `membership-type` +### `devices-module` -CRUD operations for MembershipType records. +CRUD operations for DevicesModule records. | Subcommand | Description | |------------|-------------| -| `list` | List all membershipType records | -| `find-first` | Find first matching membershipType record | -| `get` | Get a membershipType by id | -| `create` | Create a new membershipType | -| `update` | Update an existing membershipType | -| `delete` | Delete a membershipType | +| `list` | List all devicesModule records | +| `find-first` | Find first matching devicesModule record | +| `get` | Get a devicesModule by id | +| `create` | Create a new devicesModule | +| `update` | Update an existing devicesModule | +| `delete` | Delete a devicesModule | **Fields:** | Field | Type | |-------|------| -| `id` | Int | -| `name` | String | -| `description` | String | -| `prefix` | String | +| `id` | UUID | +| `databaseId` | UUID | +| `schemaId` | UUID | +| `userDevicesTableId` | UUID | +| `deviceSettingsTableId` | UUID | +| `userDevicesTable` | String | +| `deviceSettingsTable` | String | -**Required create fields:** `name`, `description`, `prefix` +**Required create fields:** `databaseId` +**Optional create fields (backend defaults):** `schemaId`, `userDevicesTableId`, `deviceSettingsTableId`, `userDevicesTable`, `deviceSettingsTable` + +### `user-connected-account` + +CRUD operations for UserConnectedAccount records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all userConnectedAccount records | +| `find-first` | Find first matching userConnectedAccount record | +| `get` | Get a userConnectedAccount by id | +| `create` | Create a new userConnectedAccount | +| `update` | Update an existing userConnectedAccount | +| `delete` | Delete a userConnectedAccount | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | UUID | +| `ownerId` | UUID | +| `service` | String | +| `identifier` | String | +| `details` | JSON | +| `isVerified` | Boolean | +| `createdAt` | Datetime | +| `updatedAt` | Datetime | + +**Optional create fields (backend defaults):** `ownerId`, `service`, `identifier`, `details`, `isVerified` ### `app-membership-default` @@ -3376,6 +3526,33 @@ CRUD operations for RateLimitsModule records. **Required create fields:** `databaseId` **Optional create fields (backend defaults):** `schemaId`, `rateLimitSettingsTableId`, `ipRateLimitsTableId`, `rateLimitsTableId`, `rateLimitSettingsTable`, `ipRateLimitsTable`, `rateLimitsTable` +### `membership-type` + +CRUD operations for MembershipType records. + +| Subcommand | Description | +|------------|-------------| +| `list` | List all membershipType records | +| `find-first` | Find first matching membershipType record | +| `get` | Get a membershipType by id | +| `create` | Create a new membershipType | +| `update` | Update an existing membershipType | +| `delete` | Delete a membershipType | + +**Fields:** + +| Field | Type | +|-------|------| +| `id` | Int | +| `name` | String | +| `description` | String | +| `prefix` | String | +| `parentMembershipType` | Int | +| `hasUsersTableEntry` | Boolean | + +**Required create fields:** `name`, `description`, `prefix` +**Optional create fields (backend defaults):** `parentMembershipType`, `hasUsersTableEntry` + ### `org-membership-default` CRUD operations for OrgMembershipDefault records. @@ -3589,6 +3766,7 @@ CRUD operations for AppMembership records. | `isDisabled` | Boolean | | `isVerified` | Boolean | | `isActive` | Boolean | +| `isExternal` | Boolean | | `isOwner` | Boolean | | `isAdmin` | Boolean | | `permissions` | BitString | @@ -3597,7 +3775,7 @@ CRUD operations for AppMembership records. | `profileId` | UUID | **Required create fields:** `actorId` -**Optional create fields (backend defaults):** `createdBy`, `updatedBy`, `isApproved`, `isBanned`, `isDisabled`, `isVerified`, `isActive`, `isOwner`, `isAdmin`, `permissions`, `granted`, `profileId` +**Optional create fields (backend defaults):** `createdBy`, `updatedBy`, `isApproved`, `isBanned`, `isDisabled`, `isVerified`, `isActive`, `isExternal`, `isOwner`, `isAdmin`, `permissions`, `granted`, `profileId` ### `hierarchy-module` @@ -3649,6 +3827,13 @@ currentUserId - **Type:** query - **Arguments:** none +### `current-user-agent` + +currentUserAgent + +- **Type:** query +- **Arguments:** none + ### `current-ip-address` currentIpAddress @@ -3656,12 +3841,16 @@ currentIpAddress - **Type:** query - **Arguments:** none -### `current-user-agent` +### `require-step-up` -currentUserAgent +requireStepUp - **Type:** query -- **Arguments:** none +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--stepUpType` | String | ### `app-permissions-get-padded-mask` @@ -3710,6 +3899,19 @@ revParse | `--storeId` | UUID | | `--refname` | String | +### `resolve-blueprint-field` + +Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--databaseId` | UUID | + | `--tableId` | UUID | + | `--fieldName` | String | + ### `org-is-manager-of` orgIsManagerOf @@ -3936,6 +4138,42 @@ rejectDatabaseTransfer | `--input.clientMutationId` | String | | `--input.transferId` | UUID | +### `disconnect-account` + +disconnectAccount + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.accountId` | UUID (required) | + +### `revoke-api-key` + +revokeApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.keyId` | UUID (required) | + +### `revoke-session` + +revokeSession + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.sessionId` | UUID (required) | + ### `verify-password` verifyPassword @@ -4063,7 +4301,7 @@ initEmptyRepo ### `construct-blueprint` -Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. +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. - **Type:** mutation - **Arguments:** @@ -4074,6 +4312,19 @@ Executes a blueprint definition by delegating to provision_* procedures. Creates | `--input.blueprintId` | UUID | | `--input.schemaId` | UUID | +### `provision-new-user` + +provisionNewUser + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.email` | String | + | `--input.password` | String | + ### `reset-password` resetPassword @@ -4118,6 +4369,39 @@ Creates a new blueprint by copying a template definition. Checks visibility: own | `--input.nameOverride` | String | | `--input.displayNameOverride` | String | +### `create-api-key` + +createApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.keyName` | String (required) | + | `--input.accessLevel` | String | + | `--input.mfaLevel` | String | + +### `provision-spatial-relation` + +Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `--input.clientMutationId` | String | + | `--input.pDatabaseId` | UUID | + | `--input.pSourceTableId` | UUID | + | `--input.pSourceFieldId` | UUID | + | `--input.pTargetTableId` | UUID | + | `--input.pTargetFieldId` | UUID | + | `--input.pName` | String | + | `--input.pOperator` | String | + | `--input.pParamName` | String | + ### `bootstrap-user` bootstrapUser @@ -4338,9 +4622,9 @@ applyRls | `--input.permissive` | Boolean | | `--input.name` | String | -### `sign-in-one-time-token` +### `sign-in-cross-origin` -signInOneTimeToken +signInCrossOrigin - **Type:** mutation - **Arguments:** @@ -4397,9 +4681,9 @@ extendTokenExpires | `--input.clientMutationId` | String | | `--input.amount` | IntervalInput | -### `sign-in` +### `sign-up` -signIn +signUp - **Type:** mutation - **Arguments:** @@ -4413,9 +4697,9 @@ signIn | `--input.credentialKind` | String | | `--input.csrfToken` | String | -### `sign-up` +### `request-cross-origin-token` -signUp +requestCrossOriginToken - **Type:** mutation - **Arguments:** @@ -4425,13 +4709,12 @@ signUp | `--input.clientMutationId` | String | | `--input.email` | String | | `--input.password` | String | + | `--input.origin` | Origin | | `--input.rememberMe` | Boolean | - | `--input.credentialKind` | String | - | `--input.csrfToken` | String | -### `one-time-token` +### `sign-in` -oneTimeToken +signIn - **Type:** mutation - **Arguments:** @@ -4441,8 +4724,10 @@ oneTimeToken | `--input.clientMutationId` | String | | `--input.email` | String | | `--input.password` | String | - | `--input.origin` | Origin | | `--input.rememberMe` | Boolean | + | `--input.credentialKind` | String | + | `--input.csrfToken` | String | + | `--input.deviceToken` | String | ### `provision-table` diff --git a/sdk/constructive-cli/src/public/cli/commands.ts b/sdk/constructive-cli/src/public/cli/commands.ts index 220c646f7..4b29c6264 100644 --- a/sdk/constructive-cli/src/public/cli/commands.ts +++ b/sdk/constructive-cli/src/public/cli/commands.ts @@ -18,6 +18,7 @@ import schemaCmd from './commands/schema'; import tableCmd from './commands/table'; import checkConstraintCmd from './commands/check-constraint'; import fieldCmd from './commands/field'; +import spatialRelationCmd from './commands/spatial-relation'; import foreignKeyConstraintCmd from './commands/foreign-key-constraint'; import fullTextSearchCmd from './commands/full-text-search'; import indexCmd from './commands/index'; @@ -31,9 +32,9 @@ import viewTableCmd from './commands/view-table'; import viewGrantCmd from './commands/view-grant'; import viewRuleCmd from './commands/view-rule'; import embeddingChunkCmd from './commands/embedding-chunk'; -import tableTemplateModuleCmd from './commands/table-template-module'; import secureTableProvisionCmd from './commands/secure-table-provision'; import relationProvisionCmd from './commands/relation-provision'; +import sessionSecretsModuleCmd from './commands/session-secrets-module'; import schemaGrantCmd from './commands/schema-grant'; import defaultPrivilegeCmd from './commands/default-privilege'; import enumCmd from './commands/enum'; @@ -71,6 +72,8 @@ import blueprintCmd from './commands/blueprint'; import blueprintTemplateCmd from './commands/blueprint-template'; import blueprintConstructionCmd from './commands/blueprint-construction'; import storageModuleCmd from './commands/storage-module'; +import entityTypeProvisionCmd from './commands/entity-type-provision'; +import webauthnCredentialsModuleCmd from './commands/webauthn-credentials-module'; import databaseProvisionModuleCmd from './commands/database-provision-module'; import appAdminGrantCmd from './commands/app-admin-grant'; import appOwnerGrantCmd from './commands/app-owner-grant'; @@ -79,6 +82,7 @@ import orgMembershipCmd from './commands/org-membership'; import orgMemberCmd from './commands/org-member'; import orgAdminGrantCmd from './commands/org-admin-grant'; import orgOwnerGrantCmd from './commands/org-owner-grant'; +import orgMemberProfileCmd from './commands/org-member-profile'; import orgGrantCmd from './commands/org-grant'; import orgChartEdgeCmd from './commands/org-chart-edge'; import orgChartEdgeGrantCmd from './commands/org-chart-edge-grant'; @@ -91,7 +95,6 @@ import appLevelCmd from './commands/app-level'; import emailCmd from './commands/email'; import phoneNumberCmd from './commands/phone-number'; import cryptoAddressCmd from './commands/crypto-address'; -import connectedAccountCmd from './commands/connected-account'; import appInviteCmd from './commands/app-invite'; import appClaimedInviteCmd from './commands/app-claimed-invite'; import orgInviteCmd from './commands/org-invite'; @@ -104,10 +107,12 @@ import roleTypeCmd from './commands/role-type'; import migrateFileCmd from './commands/migrate-file'; import appLimitDefaultCmd from './commands/app-limit-default'; import orgLimitDefaultCmd from './commands/org-limit-default'; -import membershipTypeCmd from './commands/membership-type'; +import devicesModuleCmd from './commands/devices-module'; +import userConnectedAccountCmd from './commands/user-connected-account'; import appMembershipDefaultCmd from './commands/app-membership-default'; import commitCmd from './commands/commit'; import rateLimitsModuleCmd from './commands/rate-limits-module'; +import membershipTypeCmd from './commands/membership-type'; import orgMembershipDefaultCmd from './commands/org-membership-default'; import rlsModuleCmd from './commands/rls-module'; import sqlActionCmd from './commands/sql-action'; @@ -116,12 +121,14 @@ import astMigrationCmd from './commands/ast-migration'; import appMembershipCmd from './commands/app-membership'; import hierarchyModuleCmd from './commands/hierarchy-module'; import currentUserIdCmd from './commands/current-user-id'; -import currentIpAddressCmd from './commands/current-ip-address'; import currentUserAgentCmd from './commands/current-user-agent'; +import currentIpAddressCmd from './commands/current-ip-address'; +import requireStepUpCmd from './commands/require-step-up'; import appPermissionsGetPaddedMaskCmd from './commands/app-permissions-get-padded-mask'; import orgPermissionsGetPaddedMaskCmd from './commands/org-permissions-get-padded-mask'; import stepsAchievedCmd from './commands/steps-achieved'; import revParseCmd from './commands/rev-parse'; +import resolveBlueprintFieldCmd from './commands/resolve-blueprint-field'; import orgIsManagerOfCmd from './commands/org-is-manager-of'; import appPermissionsGetMaskCmd from './commands/app-permissions-get-mask'; import orgPermissionsGetMaskCmd from './commands/org-permissions-get-mask'; @@ -140,6 +147,9 @@ import signOutCmd from './commands/sign-out'; import acceptDatabaseTransferCmd from './commands/accept-database-transfer'; import cancelDatabaseTransferCmd from './commands/cancel-database-transfer'; import rejectDatabaseTransferCmd from './commands/reject-database-transfer'; +import disconnectAccountCmd from './commands/disconnect-account'; +import revokeApiKeyCmd from './commands/revoke-api-key'; +import revokeSessionCmd from './commands/revoke-session'; import verifyPasswordCmd from './commands/verify-password'; import verifyTotpCmd from './commands/verify-totp'; import submitAppInviteCodeCmd from './commands/submit-app-invite-code'; @@ -151,9 +161,12 @@ import verifyEmailCmd from './commands/verify-email'; import freezeObjectsCmd from './commands/freeze-objects'; import initEmptyRepoCmd from './commands/init-empty-repo'; import constructBlueprintCmd from './commands/construct-blueprint'; +import provisionNewUserCmd from './commands/provision-new-user'; import resetPasswordCmd from './commands/reset-password'; import removeNodeAtPathCmd from './commands/remove-node-at-path'; import copyTemplateToBlueprintCmd from './commands/copy-template-to-blueprint'; +import createApiKeyCmd from './commands/create-api-key'; +import provisionSpatialRelationCmd from './commands/provision-spatial-relation'; import bootstrapUserCmd from './commands/bootstrap-user'; import setFieldOrderCmd from './commands/set-field-order'; import provisionUniqueConstraintCmd from './commands/provision-unique-constraint'; @@ -167,12 +180,12 @@ import updateNodeAtPathCmd from './commands/update-node-at-path'; import setAndCommitCmd from './commands/set-and-commit'; import provisionRelationCmd from './commands/provision-relation'; import applyRlsCmd from './commands/apply-rls'; -import signInOneTimeTokenCmd from './commands/sign-in-one-time-token'; +import signInCrossOriginCmd from './commands/sign-in-cross-origin'; import createUserDatabaseCmd from './commands/create-user-database'; import extendTokenExpiresCmd from './commands/extend-token-expires'; -import signInCmd from './commands/sign-in'; import signUpCmd from './commands/sign-up'; -import oneTimeTokenCmd from './commands/one-time-token'; +import requestCrossOriginTokenCmd from './commands/request-cross-origin-token'; +import signInCmd from './commands/sign-in'; import provisionTableCmd from './commands/provision-table'; import sendVerificationEmailCmd from './commands/send-verification-email'; import forgotPasswordCmd from './commands/forgot-password'; @@ -201,6 +214,7 @@ const createCommandMap: () => Record< table: tableCmd, 'check-constraint': checkConstraintCmd, field: fieldCmd, + 'spatial-relation': spatialRelationCmd, 'foreign-key-constraint': foreignKeyConstraintCmd, 'full-text-search': fullTextSearchCmd, index: indexCmd, @@ -214,9 +228,9 @@ const createCommandMap: () => Record< 'view-grant': viewGrantCmd, 'view-rule': viewRuleCmd, 'embedding-chunk': embeddingChunkCmd, - 'table-template-module': tableTemplateModuleCmd, 'secure-table-provision': secureTableProvisionCmd, 'relation-provision': relationProvisionCmd, + 'session-secrets-module': sessionSecretsModuleCmd, 'schema-grant': schemaGrantCmd, 'default-privilege': defaultPrivilegeCmd, enum: enumCmd, @@ -254,6 +268,8 @@ const createCommandMap: () => Record< 'blueprint-template': blueprintTemplateCmd, 'blueprint-construction': blueprintConstructionCmd, 'storage-module': storageModuleCmd, + 'entity-type-provision': entityTypeProvisionCmd, + 'webauthn-credentials-module': webauthnCredentialsModuleCmd, 'database-provision-module': databaseProvisionModuleCmd, 'app-admin-grant': appAdminGrantCmd, 'app-owner-grant': appOwnerGrantCmd, @@ -262,6 +278,7 @@ const createCommandMap: () => Record< 'org-member': orgMemberCmd, 'org-admin-grant': orgAdminGrantCmd, 'org-owner-grant': orgOwnerGrantCmd, + 'org-member-profile': orgMemberProfileCmd, 'org-grant': orgGrantCmd, 'org-chart-edge': orgChartEdgeCmd, 'org-chart-edge-grant': orgChartEdgeGrantCmd, @@ -274,7 +291,6 @@ const createCommandMap: () => Record< email: emailCmd, 'phone-number': phoneNumberCmd, 'crypto-address': cryptoAddressCmd, - 'connected-account': connectedAccountCmd, 'app-invite': appInviteCmd, 'app-claimed-invite': appClaimedInviteCmd, 'org-invite': orgInviteCmd, @@ -287,10 +303,12 @@ const createCommandMap: () => Record< 'migrate-file': migrateFileCmd, 'app-limit-default': appLimitDefaultCmd, 'org-limit-default': orgLimitDefaultCmd, - 'membership-type': membershipTypeCmd, + 'devices-module': devicesModuleCmd, + 'user-connected-account': userConnectedAccountCmd, 'app-membership-default': appMembershipDefaultCmd, commit: commitCmd, 'rate-limits-module': rateLimitsModuleCmd, + 'membership-type': membershipTypeCmd, 'org-membership-default': orgMembershipDefaultCmd, 'rls-module': rlsModuleCmd, 'sql-action': sqlActionCmd, @@ -299,12 +317,14 @@ const createCommandMap: () => Record< 'app-membership': appMembershipCmd, 'hierarchy-module': hierarchyModuleCmd, 'current-user-id': currentUserIdCmd, - 'current-ip-address': currentIpAddressCmd, 'current-user-agent': currentUserAgentCmd, + 'current-ip-address': currentIpAddressCmd, + 'require-step-up': requireStepUpCmd, 'app-permissions-get-padded-mask': appPermissionsGetPaddedMaskCmd, 'org-permissions-get-padded-mask': orgPermissionsGetPaddedMaskCmd, 'steps-achieved': stepsAchievedCmd, 'rev-parse': revParseCmd, + 'resolve-blueprint-field': resolveBlueprintFieldCmd, 'org-is-manager-of': orgIsManagerOfCmd, 'app-permissions-get-mask': appPermissionsGetMaskCmd, 'org-permissions-get-mask': orgPermissionsGetMaskCmd, @@ -323,6 +343,9 @@ const createCommandMap: () => Record< 'accept-database-transfer': acceptDatabaseTransferCmd, 'cancel-database-transfer': cancelDatabaseTransferCmd, 'reject-database-transfer': rejectDatabaseTransferCmd, + 'disconnect-account': disconnectAccountCmd, + 'revoke-api-key': revokeApiKeyCmd, + 'revoke-session': revokeSessionCmd, 'verify-password': verifyPasswordCmd, 'verify-totp': verifyTotpCmd, 'submit-app-invite-code': submitAppInviteCodeCmd, @@ -334,9 +357,12 @@ const createCommandMap: () => Record< 'freeze-objects': freezeObjectsCmd, 'init-empty-repo': initEmptyRepoCmd, 'construct-blueprint': constructBlueprintCmd, + 'provision-new-user': provisionNewUserCmd, 'reset-password': resetPasswordCmd, 'remove-node-at-path': removeNodeAtPathCmd, 'copy-template-to-blueprint': copyTemplateToBlueprintCmd, + 'create-api-key': createApiKeyCmd, + 'provision-spatial-relation': provisionSpatialRelationCmd, 'bootstrap-user': bootstrapUserCmd, 'set-field-order': setFieldOrderCmd, 'provision-unique-constraint': provisionUniqueConstraintCmd, @@ -350,12 +376,12 @@ const createCommandMap: () => Record< 'set-and-commit': setAndCommitCmd, 'provision-relation': provisionRelationCmd, 'apply-rls': applyRlsCmd, - 'sign-in-one-time-token': signInOneTimeTokenCmd, + 'sign-in-cross-origin': signInCrossOriginCmd, 'create-user-database': createUserDatabaseCmd, 'extend-token-expires': extendTokenExpiresCmd, - 'sign-in': signInCmd, 'sign-up': signUpCmd, - 'one-time-token': oneTimeTokenCmd, + 'request-cross-origin-token': requestCrossOriginTokenCmd, + 'sign-in': signInCmd, 'provision-table': provisionTableCmd, 'send-verification-email': sendVerificationEmailCmd, 'forgot-password': forgotPasswordCmd, @@ -364,7 +390,7 @@ const createCommandMap: () => Record< 'provision-bucket': provisionBucketCmd, }); const usage = - "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n get-all-record getAllRecord CRUD operations\n object object CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n database database CRUD operations\n schema schema CRUD operations\n table table CRUD operations\n check-constraint checkConstraint CRUD operations\n field field CRUD operations\n foreign-key-constraint foreignKeyConstraint CRUD operations\n full-text-search fullTextSearch CRUD operations\n index index CRUD operations\n policy policy CRUD operations\n primary-key-constraint primaryKeyConstraint CRUD operations\n table-grant tableGrant CRUD operations\n trigger trigger CRUD operations\n unique-constraint uniqueConstraint CRUD operations\n view view CRUD operations\n view-table viewTable CRUD operations\n view-grant viewGrant CRUD operations\n view-rule viewRule CRUD operations\n embedding-chunk embeddingChunk CRUD operations\n table-template-module tableTemplateModule CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n relation-provision relationProvision CRUD operations\n schema-grant schemaGrant CRUD operations\n default-privilege defaultPrivilege CRUD operations\n enum enum CRUD operations\n api-schema apiSchema CRUD operations\n api-module apiModule CRUD operations\n domain domain CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-theme siteTheme CRUD operations\n trigger-function triggerFunction CRUD operations\n database-transfer databaseTransfer CRUD operations\n api api CRUD operations\n site site CRUD operations\n app app CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n default-ids-module defaultIdsModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n emails-module emailsModule CRUD operations\n encrypted-secrets-module encryptedSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n levels-module levelsModule CRUD operations\n limits-module limitsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n memberships-module membershipsModule CRUD operations\n permissions-module permissionsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n profiles-module profilesModule CRUD operations\n secrets-module secretsModule CRUD operations\n sessions-module sessionsModule CRUD operations\n user-auth-module userAuthModule CRUD operations\n users-module usersModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n blueprint-construction blueprintConstruction CRUD operations\n storage-module storageModule CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-grant appGrant CRUD operations\n org-membership orgMembership CRUD operations\n org-member orgMember CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-limit appLimit CRUD operations\n org-limit orgLimit CRUD operations\n app-step appStep CRUD operations\n app-achievement appAchievement CRUD operations\n app-level appLevel CRUD operations\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n connected-account connectedAccount CRUD operations\n app-invite appInvite CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n org-invite orgInvite CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n audit-log auditLog CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n role-type roleType CRUD operations\n migrate-file migrateFile CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n membership-type membershipType CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n commit commit CRUD operations\n rate-limits-module rateLimitsModule CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n rls-module rlsModule CRUD operations\n sql-action sqlAction CRUD operations\n user user CRUD operations\n ast-migration astMigration CRUD operations\n app-membership appMembership CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n current-user-id currentUserId\n current-ip-address currentIpAddress\n current-user-agent currentUserAgent\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n steps-achieved stepsAchieved\n rev-parse revParse\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n resolve-blueprint-table Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error.\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n get-all-objects-from-root Reads and enables pagination through a set of `Object`.\n get-path-objects-from-root Reads and enables pagination through a set of `Object`.\n get-object-at-path getObjectAtPath\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n current-user currentUser\n send-account-deletion-email sendAccountDeletionEmail\n sign-out signOut\n accept-database-transfer acceptDatabaseTransfer\n cancel-database-transfer cancelDatabaseTransfer\n reject-database-transfer rejectDatabaseTransfer\n verify-password verifyPassword\n verify-totp verifyTotp\n submit-app-invite-code submitAppInviteCode\n submit-org-invite-code submitOrgInviteCode\n check-password checkPassword\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n freeze-objects freezeObjects\n init-empty-repo initEmptyRepo\n construct-blueprint Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure.\n reset-password resetPassword\n remove-node-at-path removeNodeAtPath\n copy-template-to-blueprint 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.\n bootstrap-user bootstrapUser\n set-field-order setFieldOrder\n provision-unique-constraint Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.\n provision-full-text-search Creates a full-text search configuration on a table. Accepts a jsonb definition with field (tsvector column name) and sources (array of {field, weight, lang}). Graceful: skips if FTS config already exists for the same (table_id, field_id). Returns the fts_id.\n provision-index Creates an index on a table. Accepts a jsonb definition with columns (array of names or single column string), access_method (default BTREE), is_unique, op_classes, options, and name (auto-generated if omitted). Graceful: skips if an index with the same (table_id, field_ids, access_method) already exists. Returns the index_id.\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n provision-database-with-user provisionDatabaseWithUser\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n provision-relation Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id).\n apply-rls applyRls\n sign-in-one-time-token signInOneTimeToken\n create-user-database Creates a new user database with all required modules, permissions, and RLS policies.\n\nParameters:\n - database_name: Name for the new database (required)\n - owner_id: UUID of the owner user (required)\n - include_invites: Include invite system (default: true)\n - include_groups: Include group-level memberships (default: false)\n - include_levels: Include levels/achievements (default: false)\n - bitlen: Bit length for permission masks (default: 64)\n - tokens_expiration: Token expiration interval (default: 30 days)\n\nReturns the database_id UUID of the newly created database.\n\nExample usage:\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups\n\n extend-token-expires extendTokenExpires\n sign-in signIn\n sign-up signUp\n one-time-token oneTimeToken\n provision-table Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields).\n send-verification-email sendVerificationEmail\n forgot-password forgotPassword\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n confirm-upload Confirm that a file has been uploaded to S3.\nVerifies the object exists in S3, checks content-type,\nand transitions the file status from 'pending' to 'ready'.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n"; + "\ncsdk \n\nCommands:\n context Manage API contexts\n auth Manage authentication\n org-get-managers-record orgGetManagersRecord CRUD operations\n org-get-subordinates-record orgGetSubordinatesRecord CRUD operations\n get-all-record getAllRecord CRUD operations\n object object CRUD operations\n app-permission appPermission CRUD operations\n org-permission orgPermission CRUD operations\n app-level-requirement appLevelRequirement CRUD operations\n database database CRUD operations\n schema schema CRUD operations\n table table CRUD operations\n check-constraint checkConstraint CRUD operations\n field field CRUD operations\n spatial-relation spatialRelation CRUD operations\n foreign-key-constraint foreignKeyConstraint CRUD operations\n full-text-search fullTextSearch CRUD operations\n index index CRUD operations\n policy policy CRUD operations\n primary-key-constraint primaryKeyConstraint CRUD operations\n table-grant tableGrant CRUD operations\n trigger trigger CRUD operations\n unique-constraint uniqueConstraint CRUD operations\n view view CRUD operations\n view-table viewTable CRUD operations\n view-grant viewGrant CRUD operations\n view-rule viewRule CRUD operations\n embedding-chunk embeddingChunk CRUD operations\n secure-table-provision secureTableProvision CRUD operations\n relation-provision relationProvision CRUD operations\n session-secrets-module sessionSecretsModule CRUD operations\n schema-grant schemaGrant CRUD operations\n default-privilege defaultPrivilege CRUD operations\n enum enum CRUD operations\n api-schema apiSchema CRUD operations\n api-module apiModule CRUD operations\n domain domain CRUD operations\n site-metadatum siteMetadatum CRUD operations\n site-module siteModule CRUD operations\n site-theme siteTheme CRUD operations\n trigger-function triggerFunction CRUD operations\n database-transfer databaseTransfer CRUD operations\n api api CRUD operations\n site site CRUD operations\n app app CRUD operations\n connected-accounts-module connectedAccountsModule CRUD operations\n crypto-addresses-module cryptoAddressesModule CRUD operations\n crypto-auth-module cryptoAuthModule CRUD operations\n default-ids-module defaultIdsModule CRUD operations\n denormalized-table-field denormalizedTableField CRUD operations\n emails-module emailsModule CRUD operations\n encrypted-secrets-module encryptedSecretsModule CRUD operations\n invites-module invitesModule CRUD operations\n levels-module levelsModule CRUD operations\n limits-module limitsModule CRUD operations\n membership-types-module membershipTypesModule CRUD operations\n memberships-module membershipsModule CRUD operations\n permissions-module permissionsModule CRUD operations\n phone-numbers-module phoneNumbersModule CRUD operations\n profiles-module profilesModule CRUD operations\n secrets-module secretsModule CRUD operations\n sessions-module sessionsModule CRUD operations\n user-auth-module userAuthModule CRUD operations\n users-module usersModule CRUD operations\n blueprint blueprint CRUD operations\n blueprint-template blueprintTemplate CRUD operations\n blueprint-construction blueprintConstruction CRUD operations\n storage-module storageModule CRUD operations\n entity-type-provision entityTypeProvision CRUD operations\n webauthn-credentials-module webauthnCredentialsModule CRUD operations\n database-provision-module databaseProvisionModule CRUD operations\n app-admin-grant appAdminGrant CRUD operations\n app-owner-grant appOwnerGrant CRUD operations\n app-grant appGrant CRUD operations\n org-membership orgMembership CRUD operations\n org-member orgMember CRUD operations\n org-admin-grant orgAdminGrant CRUD operations\n org-owner-grant orgOwnerGrant CRUD operations\n org-member-profile orgMemberProfile CRUD operations\n org-grant orgGrant CRUD operations\n org-chart-edge orgChartEdge CRUD operations\n org-chart-edge-grant orgChartEdgeGrant CRUD operations\n org-permission-default orgPermissionDefault CRUD operations\n app-limit appLimit CRUD operations\n org-limit orgLimit CRUD operations\n app-step appStep CRUD operations\n app-achievement appAchievement CRUD operations\n app-level appLevel CRUD operations\n email email CRUD operations\n phone-number phoneNumber CRUD operations\n crypto-address cryptoAddress CRUD operations\n app-invite appInvite CRUD operations\n app-claimed-invite appClaimedInvite CRUD operations\n org-invite orgInvite CRUD operations\n org-claimed-invite orgClaimedInvite CRUD operations\n audit-log auditLog CRUD operations\n app-permission-default appPermissionDefault CRUD operations\n ref ref CRUD operations\n store store CRUD operations\n role-type roleType CRUD operations\n migrate-file migrateFile CRUD operations\n app-limit-default appLimitDefault CRUD operations\n org-limit-default orgLimitDefault CRUD operations\n devices-module devicesModule CRUD operations\n user-connected-account userConnectedAccount CRUD operations\n app-membership-default appMembershipDefault CRUD operations\n commit commit CRUD operations\n rate-limits-module rateLimitsModule CRUD operations\n membership-type membershipType CRUD operations\n org-membership-default orgMembershipDefault CRUD operations\n rls-module rlsModule CRUD operations\n sql-action sqlAction CRUD operations\n user user CRUD operations\n ast-migration astMigration CRUD operations\n app-membership appMembership CRUD operations\n hierarchy-module hierarchyModule CRUD operations\n current-user-id currentUserId\n current-user-agent currentUserAgent\n current-ip-address currentIpAddress\n require-step-up requireStepUp\n app-permissions-get-padded-mask appPermissionsGetPaddedMask\n org-permissions-get-padded-mask orgPermissionsGetPaddedMask\n steps-achieved stepsAchieved\n rev-parse revParse\n resolve-blueprint-field Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. \"location\") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this.\n org-is-manager-of orgIsManagerOf\n app-permissions-get-mask appPermissionsGetMask\n org-permissions-get-mask orgPermissionsGetMask\n resolve-blueprint-table Resolves a table_name (with optional schema_name) to a table_id. Resolution order: (1) if schema_name provided, exact lookup via metaschema_public.schema.name + metaschema_public.table; (2) check local table_map (tables created in current blueprint); (3) search metaschema_public.table by name across all schemas; (4) if multiple matches, throw ambiguous error asking for schema_name; (5) if no match, throw not-found error.\n app-permissions-get-mask-by-names appPermissionsGetMaskByNames\n org-permissions-get-mask-by-names orgPermissionsGetMaskByNames\n get-all-objects-from-root Reads and enables pagination through a set of `Object`.\n get-path-objects-from-root Reads and enables pagination through a set of `Object`.\n get-object-at-path getObjectAtPath\n app-permissions-get-by-mask Reads and enables pagination through a set of `AppPermission`.\n org-permissions-get-by-mask Reads and enables pagination through a set of `OrgPermission`.\n steps-required Reads and enables pagination through a set of `AppLevelRequirement`.\n current-user currentUser\n send-account-deletion-email sendAccountDeletionEmail\n sign-out signOut\n accept-database-transfer acceptDatabaseTransfer\n cancel-database-transfer cancelDatabaseTransfer\n reject-database-transfer rejectDatabaseTransfer\n disconnect-account disconnectAccount\n revoke-api-key revokeApiKey\n revoke-session revokeSession\n verify-password verifyPassword\n verify-totp verifyTotp\n submit-app-invite-code submitAppInviteCode\n submit-org-invite-code submitOrgInviteCode\n check-password checkPassword\n confirm-delete-account confirmDeleteAccount\n set-password setPassword\n verify-email verifyEmail\n freeze-objects freezeObjects\n init-empty-repo initEmptyRepo\n construct-blueprint 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 \u2014 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.\n provision-new-user provisionNewUser\n reset-password resetPassword\n remove-node-at-path removeNodeAtPath\n copy-template-to-blueprint 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.\n create-api-key createApiKey\n provision-spatial-relation Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin \u2194 param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist \u2014 this is a metadata-only insert.\n bootstrap-user bootstrapUser\n set-field-order setFieldOrder\n provision-unique-constraint Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists.\n provision-full-text-search Creates a full-text search configuration on a table. Accepts a jsonb definition with field (tsvector column name) and sources (array of {field, weight, lang}). Graceful: skips if FTS config already exists for the same (table_id, field_id). Returns the fts_id.\n provision-index Creates an index on a table. Accepts a jsonb definition with columns (array of names or single column string), access_method (default BTREE), is_unique, op_classes, options, and name (auto-generated if omitted). Graceful: skips if an index with the same (table_id, field_ids, access_method) already exists. Returns the index_id.\n set-data-at-path setDataAtPath\n set-props-and-commit setPropsAndCommit\n provision-database-with-user provisionDatabaseWithUser\n insert-node-at-path insertNodeAtPath\n update-node-at-path updateNodeAtPath\n set-and-commit setAndCommit\n provision-relation Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id).\n apply-rls applyRls\n sign-in-cross-origin signInCrossOrigin\n create-user-database Creates a new user database with all required modules, permissions, and RLS policies.\n\nParameters:\n - database_name: Name for the new database (required)\n - owner_id: UUID of the owner user (required)\n - include_invites: Include invite system (default: true)\n - include_groups: Include group-level memberships (default: false)\n - include_levels: Include levels/achievements (default: false)\n - bitlen: Bit length for permission masks (default: 64)\n - tokens_expiration: Token expiration interval (default: 30 days)\n\nReturns the database_id UUID of the newly created database.\n\nExample usage:\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups\n\n extend-token-expires extendTokenExpires\n sign-up signUp\n request-cross-origin-token requestCrossOriginToken\n sign-in signIn\n provision-table Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields).\n send-verification-email sendVerificationEmail\n forgot-password forgotPassword\n request-upload-url Request a presigned URL for uploading a file directly to S3.\nClient computes SHA-256 of the file content and provides it here.\nIf a file with the same hash already exists (dedup), returns the\nexisting file ID and deduplicated=true with no uploadUrl.\n confirm-upload Confirm that a file has been uploaded to S3.\nVerifies the object exists in S3, checks content-type,\nand transitions the file status from 'pending' to 'ready'.\n provision-bucket Provision an S3 bucket for a logical bucket in the database.\nReads the bucket config via RLS, then creates and configures\nthe S3 bucket with the appropriate privacy policies, CORS rules,\nand lifecycle settings.\n\n --help, -h Show this help message\n --version, -v Show version\n"; export const commands = async ( argv: Partial>, prompter: Inquirerer, diff --git a/sdk/constructive-cli/src/public/cli/commands/app-membership.ts b/sdk/constructive-cli/src/public/cli/commands/app-membership.ts index d463fd934..ae7106f87 100644 --- a/sdk/constructive-cli/src/public/cli/commands/app-membership.ts +++ b/sdk/constructive-cli/src/public/cli/commands/app-membership.ts @@ -26,6 +26,7 @@ const fieldSchema: FieldSchema = { isDisabled: 'boolean', isVerified: 'boolean', isActive: 'boolean', + isExternal: 'boolean', isOwner: 'boolean', isAdmin: 'boolean', permissions: 'string', @@ -94,6 +95,7 @@ async function handleList(argv: Partial>, _prompter: Inq isDisabled: true, isVerified: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, @@ -130,6 +132,7 @@ async function handleFindFirst(argv: Partial>, _prompter isDisabled: true, isVerified: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, @@ -178,6 +181,7 @@ async function handleGet(argv: Partial>, prompter: Inqui isDisabled: true, isVerified: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, @@ -248,6 +252,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'boolean', + name: 'isExternal', + message: 'isExternal', + required: false, + skipPrompt: true, + }, { type: 'boolean', name: 'isOwner', @@ -306,6 +317,7 @@ async function handleCreate(argv: Partial>, prompter: In isDisabled: cleanedData.isDisabled, isVerified: cleanedData.isVerified, isActive: cleanedData.isActive, + isExternal: cleanedData.isExternal, isOwner: cleanedData.isOwner, isAdmin: cleanedData.isAdmin, permissions: cleanedData.permissions, @@ -324,6 +336,7 @@ async function handleCreate(argv: Partial>, prompter: In isDisabled: true, isVerified: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, @@ -400,6 +413,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'boolean', + name: 'isExternal', + message: 'isExternal', + required: false, + skipPrompt: true, + }, { type: 'boolean', name: 'isOwner', @@ -458,6 +478,7 @@ async function handleUpdate(argv: Partial>, prompter: In isDisabled: cleanedData.isDisabled, isVerified: cleanedData.isVerified, isActive: cleanedData.isActive, + isExternal: cleanedData.isExternal, isOwner: cleanedData.isOwner, isAdmin: cleanedData.isAdmin, permissions: cleanedData.permissions, @@ -476,6 +497,7 @@ async function handleUpdate(argv: Partial>, prompter: In isDisabled: true, isVerified: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, diff --git a/sdk/constructive-cli/src/public/cli/commands/construct-blueprint.ts b/sdk/constructive-cli/src/public/cli/commands/construct-blueprint.ts index 1cb6057ef..6a7d31acf 100644 --- a/sdk/constructive-cli/src/public/cli/commands/construct-blueprint.ts +++ b/sdk/constructive-cli/src/public/cli/commands/construct-blueprint.ts @@ -16,7 +16,7 @@ export default async ( try { if (argv.help || argv.h) { console.log( - 'construct-blueprint - Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure.\n\nUsage: construct-blueprint [OPTIONS]\n' + 'construct-blueprint - 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 \u2014 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.\n\nUsage: construct-blueprint [OPTIONS]\n' ); process.exit(0); } diff --git a/sdk/constructive-cli/src/public/cli/commands/create-api-key.ts b/sdk/constructive-cli/src/public/cli/commands/create-api-key.ts new file mode 100644 index 000000000..672db1229 --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/create-api-key.ts @@ -0,0 +1,51 @@ +/** + * CLI command for mutation createApiKey + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { CreateApiKeyVariables } from '../../orm/mutation'; +import type { CreateApiKeyPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('create-api-key - createApiKey\n\nUsage: create-api-key [OPTIONS]\n'); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .createApiKey( + parsedAnswers as unknown as CreateApiKeyVariables, + { + select: selectFields, + } as unknown as { + select: CreateApiKeyPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: createApiKey'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/public/cli/commands/devices-module.ts b/sdk/constructive-cli/src/public/cli/commands/devices-module.ts new file mode 100644 index 000000000..a8f42cbe1 --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/devices-module.ts @@ -0,0 +1,361 @@ +/** + * CLI commands for DevicesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer, extractFirst } from 'inquirerer'; +import { getClient } from '../executor'; +import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; +import type { FieldSchema } from '../utils'; +import type { + CreateDevicesModuleInput, + DevicesModulePatch, + DevicesModuleSelect, + DevicesModuleFilter, + DevicesModuleOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + databaseId: 'uuid', + schemaId: 'uuid', + userDevicesTableId: 'uuid', + deviceSettingsTableId: 'uuid', + userDevicesTable: 'string', + deviceSettingsTable: 'string', +}; +const usage = + '\ndevices-module \n\nCommands:\n list List devicesModule records\n find-first Find first matching devicesModule record\n get Get a devicesModule by ID\n create Create a new devicesModule\n update Update an existing devicesModule\n delete Delete a devicesModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + if (argv.help || argv.h) { + console.log(usage); + process.exit(0); + } + const { first: subcommand, newArgv } = extractFirst(argv); + if (!subcommand) { + const answer = await prompter.prompt(argv, [ + { + type: 'autocomplete', + name: 'subcommand', + message: 'What do you want to do?', + options: ['list', 'find-first', 'get', 'create', 'update', 'delete'], + }, + ]); + return handleTableSubcommand(answer.subcommand as string, newArgv, prompter); + } + return handleTableSubcommand(subcommand, newArgv, prompter); +}; +async function handleTableSubcommand( + subcommand: string, + argv: Partial>, + prompter: Inquirerer +) { + switch (subcommand) { + case 'list': + return handleList(argv, prompter); + case 'find-first': + return handleFindFirst(argv, prompter); + case 'get': + return handleGet(argv, prompter); + case 'create': + return handleCreate(argv, prompter); + case 'update': + return handleUpdate(argv, prompter); + case 'delete': + return handleDelete(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + databaseId: true, + schemaId: true, + userDevicesTableId: true, + deviceSettingsTableId: true, + userDevicesTable: true, + deviceSettingsTable: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: DevicesModuleSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.devicesModule.findMany(findManyArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to list records.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleFindFirst(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + databaseId: true, + schemaId: true, + userDevicesTableId: true, + deviceSettingsTableId: true, + userDevicesTable: true, + deviceSettingsTable: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: DevicesModuleSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.devicesModule.findFirst(findFirstArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to find record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleGet(argv: Partial>, prompter: Inquirerer) { + try { + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const client = getClient(); + const result = await client.devicesModule + .findOne({ + id: answers.id as string, + select: { + id: true, + databaseId: true, + schemaId: true, + userDevicesTableId: true, + deviceSettingsTableId: true, + userDevicesTable: true, + deviceSettingsTable: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Record not found.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, + { + type: 'text', + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'userDevicesTableId', + message: 'userDevicesTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'deviceSettingsTableId', + message: 'deviceSettingsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'userDevicesTable', + message: 'userDevicesTable', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'deviceSettingsTable', + message: 'deviceSettingsTable', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateDevicesModuleInput['devicesModule']; + const client = getClient(); + const result = await client.devicesModule + .create({ + data: { + databaseId: cleanedData.databaseId, + schemaId: cleanedData.schemaId, + userDevicesTableId: cleanedData.userDevicesTableId, + deviceSettingsTableId: cleanedData.deviceSettingsTableId, + userDevicesTable: cleanedData.userDevicesTable, + deviceSettingsTable: cleanedData.deviceSettingsTable, + }, + select: { + id: true, + databaseId: true, + schemaId: true, + userDevicesTableId: true, + deviceSettingsTableId: true, + userDevicesTable: true, + deviceSettingsTable: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to create record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleUpdate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, + { + type: 'text', + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'userDevicesTableId', + message: 'userDevicesTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'deviceSettingsTableId', + message: 'deviceSettingsTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'userDevicesTable', + message: 'userDevicesTable', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'deviceSettingsTable', + message: 'deviceSettingsTable', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as DevicesModulePatch; + const client = getClient(); + const result = await client.devicesModule + .update({ + where: { + id: answers.id as string, + }, + data: { + databaseId: cleanedData.databaseId, + schemaId: cleanedData.schemaId, + userDevicesTableId: cleanedData.userDevicesTableId, + deviceSettingsTableId: cleanedData.deviceSettingsTableId, + userDevicesTable: cleanedData.userDevicesTable, + deviceSettingsTable: cleanedData.deviceSettingsTable, + }, + select: { + id: true, + databaseId: true, + schemaId: true, + userDevicesTableId: true, + deviceSettingsTableId: true, + userDevicesTable: true, + deviceSettingsTable: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to update record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleDelete(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const client = getClient(); + const result = await client.devicesModule + .delete({ + where: { + id: answers.id as string, + }, + select: { + id: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to delete record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} diff --git a/sdk/constructive-cli/src/public/cli/commands/disconnect-account.ts b/sdk/constructive-cli/src/public/cli/commands/disconnect-account.ts new file mode 100644 index 000000000..cf78a9609 --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/disconnect-account.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation disconnectAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { DisconnectAccountVariables } from '../../orm/mutation'; +import type { DisconnectAccountPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'disconnect-account - disconnectAccount\n\nUsage: disconnect-account [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .disconnectAccount( + parsedAnswers as unknown as DisconnectAccountVariables, + { + select: selectFields, + } as unknown as { + select: DisconnectAccountPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: disconnectAccount'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/public/cli/commands/entity-type-provision.ts b/sdk/constructive-cli/src/public/cli/commands/entity-type-provision.ts new file mode 100644 index 000000000..e6122e36e --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/entity-type-provision.ts @@ -0,0 +1,581 @@ +/** + * CLI commands for EntityTypeProvision + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer, extractFirst } from 'inquirerer'; +import { getClient } from '../executor'; +import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; +import type { FieldSchema } from '../utils'; +import type { + CreateEntityTypeProvisionInput, + EntityTypeProvisionPatch, + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + databaseId: 'uuid', + name: 'string', + prefix: 'string', + description: 'string', + parentEntity: 'string', + tableName: 'string', + isVisible: 'boolean', + hasLimits: 'boolean', + hasProfiles: 'boolean', + hasLevels: 'boolean', + skipEntityPolicies: 'boolean', + tableProvision: 'json', + outMembershipType: 'int', + outEntityTableId: 'uuid', + outEntityTableName: 'string', + outInstalledModules: 'string', +}; +const usage = + '\nentity-type-provision \n\nCommands:\n list List entityTypeProvision records\n find-first Find first matching entityTypeProvision record\n get Get a entityTypeProvision by ID\n create Create a new entityTypeProvision\n update Update an existing entityTypeProvision\n delete Delete a entityTypeProvision\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + if (argv.help || argv.h) { + console.log(usage); + process.exit(0); + } + const { first: subcommand, newArgv } = extractFirst(argv); + if (!subcommand) { + const answer = await prompter.prompt(argv, [ + { + type: 'autocomplete', + name: 'subcommand', + message: 'What do you want to do?', + options: ['list', 'find-first', 'get', 'create', 'update', 'delete'], + }, + ]); + return handleTableSubcommand(answer.subcommand as string, newArgv, prompter); + } + return handleTableSubcommand(subcommand, newArgv, prompter); +}; +async function handleTableSubcommand( + subcommand: string, + argv: Partial>, + prompter: Inquirerer +) { + switch (subcommand) { + case 'list': + return handleList(argv, prompter); + case 'find-first': + return handleFindFirst(argv, prompter); + case 'get': + return handleGet(argv, prompter); + case 'create': + return handleCreate(argv, prompter); + case 'update': + return handleUpdate(argv, prompter); + case 'delete': + return handleDelete(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + databaseId: true, + name: true, + prefix: true, + description: true, + parentEntity: true, + tableName: true, + isVisible: true, + hasLimits: true, + hasProfiles: true, + hasLevels: true, + skipEntityPolicies: true, + tableProvision: true, + outMembershipType: true, + outEntityTableId: true, + outEntityTableName: true, + outInstalledModules: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs< + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy + > & { + select: EntityTypeProvisionSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.entityTypeProvision.findMany(findManyArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to list records.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleFindFirst(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + databaseId: true, + name: true, + prefix: true, + description: true, + parentEntity: true, + tableName: true, + isVisible: true, + hasLimits: true, + hasProfiles: true, + hasLevels: true, + skipEntityPolicies: true, + tableProvision: true, + outMembershipType: true, + outEntityTableId: true, + outEntityTableName: true, + outInstalledModules: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: EntityTypeProvisionSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.entityTypeProvision.findFirst(findFirstArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to find record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleGet(argv: Partial>, prompter: Inquirerer) { + try { + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const client = getClient(); + const result = await client.entityTypeProvision + .findOne({ + id: answers.id as string, + select: { + id: true, + databaseId: true, + name: true, + prefix: true, + description: true, + parentEntity: true, + tableName: true, + isVisible: true, + hasLimits: true, + hasProfiles: true, + hasLevels: true, + skipEntityPolicies: true, + tableProvision: true, + outMembershipType: true, + outEntityTableId: true, + outEntityTableName: true, + outInstalledModules: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Record not found.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: true, + }, + { + type: 'text', + name: 'name', + message: 'name', + required: true, + }, + { + type: 'text', + name: 'prefix', + message: 'prefix', + required: true, + }, + { + type: 'text', + name: 'description', + message: 'description', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'parentEntity', + message: 'parentEntity', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'tableName', + message: 'tableName', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'isVisible', + message: 'isVisible', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'hasLimits', + message: 'hasLimits', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'hasProfiles', + message: 'hasProfiles', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'hasLevels', + message: 'hasLevels', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'skipEntityPolicies', + message: 'skipEntityPolicies', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'tableProvision', + message: 'tableProvision', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'outMembershipType', + message: 'outMembershipType', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'outEntityTableId', + message: 'outEntityTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'outEntityTableName', + message: 'outEntityTableName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'outInstalledModules', + message: 'outInstalledModules', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateEntityTypeProvisionInput['entityTypeProvision']; + const client = getClient(); + const result = await client.entityTypeProvision + .create({ + data: { + databaseId: cleanedData.databaseId, + name: cleanedData.name, + prefix: cleanedData.prefix, + description: cleanedData.description, + parentEntity: cleanedData.parentEntity, + tableName: cleanedData.tableName, + isVisible: cleanedData.isVisible, + hasLimits: cleanedData.hasLimits, + hasProfiles: cleanedData.hasProfiles, + hasLevels: cleanedData.hasLevels, + skipEntityPolicies: cleanedData.skipEntityPolicies, + tableProvision: cleanedData.tableProvision, + outMembershipType: cleanedData.outMembershipType, + outEntityTableId: cleanedData.outEntityTableId, + outEntityTableName: cleanedData.outEntityTableName, + outInstalledModules: cleanedData.outInstalledModules, + }, + select: { + id: true, + databaseId: true, + name: true, + prefix: true, + description: true, + parentEntity: true, + tableName: true, + isVisible: true, + hasLimits: true, + hasProfiles: true, + hasLevels: true, + skipEntityPolicies: true, + tableProvision: true, + outMembershipType: true, + outEntityTableId: true, + outEntityTableName: true, + outInstalledModules: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to create record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleUpdate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + }, + { + type: 'text', + name: 'name', + message: 'name', + required: false, + }, + { + type: 'text', + name: 'prefix', + message: 'prefix', + required: false, + }, + { + type: 'text', + name: 'description', + message: 'description', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'parentEntity', + message: 'parentEntity', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'tableName', + message: 'tableName', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'isVisible', + message: 'isVisible', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'hasLimits', + message: 'hasLimits', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'hasProfiles', + message: 'hasProfiles', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'hasLevels', + message: 'hasLevels', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'skipEntityPolicies', + message: 'skipEntityPolicies', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'tableProvision', + message: 'tableProvision', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'outMembershipType', + message: 'outMembershipType', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'outEntityTableId', + message: 'outEntityTableId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'outEntityTableName', + message: 'outEntityTableName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'outInstalledModules', + message: 'outInstalledModules', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as EntityTypeProvisionPatch; + const client = getClient(); + const result = await client.entityTypeProvision + .update({ + where: { + id: answers.id as string, + }, + data: { + databaseId: cleanedData.databaseId, + name: cleanedData.name, + prefix: cleanedData.prefix, + description: cleanedData.description, + parentEntity: cleanedData.parentEntity, + tableName: cleanedData.tableName, + isVisible: cleanedData.isVisible, + hasLimits: cleanedData.hasLimits, + hasProfiles: cleanedData.hasProfiles, + hasLevels: cleanedData.hasLevels, + skipEntityPolicies: cleanedData.skipEntityPolicies, + tableProvision: cleanedData.tableProvision, + outMembershipType: cleanedData.outMembershipType, + outEntityTableId: cleanedData.outEntityTableId, + outEntityTableName: cleanedData.outEntityTableName, + outInstalledModules: cleanedData.outInstalledModules, + }, + select: { + id: true, + databaseId: true, + name: true, + prefix: true, + description: true, + parentEntity: true, + tableName: true, + isVisible: true, + hasLimits: true, + hasProfiles: true, + hasLevels: true, + skipEntityPolicies: true, + tableProvision: true, + outMembershipType: true, + outEntityTableId: true, + outEntityTableName: true, + outInstalledModules: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to update record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleDelete(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const client = getClient(); + const result = await client.entityTypeProvision + .delete({ + where: { + id: answers.id as string, + }, + select: { + id: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to delete record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} diff --git a/sdk/constructive-cli/src/public/cli/commands/membership-type.ts b/sdk/constructive-cli/src/public/cli/commands/membership-type.ts index 91dc29236..cc1ba7915 100644 --- a/sdk/constructive-cli/src/public/cli/commands/membership-type.ts +++ b/sdk/constructive-cli/src/public/cli/commands/membership-type.ts @@ -20,6 +20,8 @@ const fieldSchema: FieldSchema = { name: 'string', description: 'string', prefix: 'string', + parentMembershipType: 'int', + hasUsersTableEntry: 'boolean', }; const usage = '\nmembership-type \n\nCommands:\n list List membershipType records\n find-first Find first matching membershipType record\n get Get a membershipType by ID\n create Create a new membershipType\n update Update an existing membershipType\n delete Delete a membershipType\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; @@ -76,6 +78,8 @@ async function handleList(argv: Partial>, _prompter: Inq name: true, description: true, prefix: true, + parentMembershipType: true, + hasUsersTableEntry: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs & { @@ -100,6 +104,8 @@ async function handleFindFirst(argv: Partial>, _prompter name: true, description: true, prefix: true, + parentMembershipType: true, + hasUsersTableEntry: true, }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs & { @@ -136,6 +142,8 @@ async function handleGet(argv: Partial>, prompter: Inqui name: true, description: true, prefix: true, + parentMembershipType: true, + hasUsersTableEntry: true, }, }) .execute(); @@ -169,6 +177,20 @@ async function handleCreate(argv: Partial>, prompter: In message: 'prefix', required: true, }, + { + type: 'text', + name: 'parentMembershipType', + message: 'parentMembershipType', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'hasUsersTableEntry', + message: 'hasUsersTableEntry', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined( @@ -182,12 +204,16 @@ async function handleCreate(argv: Partial>, prompter: In name: cleanedData.name, description: cleanedData.description, prefix: cleanedData.prefix, + parentMembershipType: cleanedData.parentMembershipType, + hasUsersTableEntry: cleanedData.hasUsersTableEntry, }, select: { id: true, name: true, description: true, prefix: true, + parentMembershipType: true, + hasUsersTableEntry: true, }, }) .execute(); @@ -227,6 +253,20 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'prefix', required: false, }, + { + type: 'text', + name: 'parentMembershipType', + message: 'parentMembershipType', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'hasUsersTableEntry', + message: 'hasUsersTableEntry', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as MembershipTypePatch; @@ -240,12 +280,16 @@ async function handleUpdate(argv: Partial>, prompter: In name: cleanedData.name, description: cleanedData.description, prefix: cleanedData.prefix, + parentMembershipType: cleanedData.parentMembershipType, + hasUsersTableEntry: cleanedData.hasUsersTableEntry, }, select: { id: true, name: true, description: true, prefix: true, + parentMembershipType: true, + hasUsersTableEntry: true, }, }) .execute(); diff --git a/sdk/constructive-cli/src/public/cli/commands/memberships-module.ts b/sdk/constructive-cli/src/public/cli/commands/memberships-module.ts index 8345b95ae..b37383de7 100644 --- a/sdk/constructive-cli/src/public/cli/commands/memberships-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/memberships-module.ts @@ -47,6 +47,7 @@ const fieldSchema: FieldSchema = { entityIdsByMask: 'string', entityIdsByPerm: 'string', entityIdsFunction: 'string', + memberProfilesTableId: 'uuid', }; const usage = '\nmemberships-module \n\nCommands:\n list List membershipsModule records\n find-first Find first matching membershipsModule record\n get Get a membershipsModule by ID\n create Create a new membershipsModule\n update Update an existing membershipsModule\n delete Delete a membershipsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; @@ -130,6 +131,7 @@ async function handleList(argv: Partial>, _prompter: Inq entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, + memberProfilesTableId: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs & { @@ -181,6 +183,7 @@ async function handleFindFirst(argv: Partial>, _prompter entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, + memberProfilesTableId: true, }; const findFirstArgs = parseFindFirstArgs< FindFirstArgs & { @@ -244,6 +247,7 @@ async function handleGet(argv: Partial>, prompter: Inqui entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, + memberProfilesTableId: true, }, }) .execute(); @@ -467,6 +471,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'memberProfilesTableId', + message: 'memberProfilesTableId', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined( @@ -507,6 +518,7 @@ async function handleCreate(argv: Partial>, prompter: In entityIdsByMask: cleanedData.entityIdsByMask, entityIdsByPerm: cleanedData.entityIdsByPerm, entityIdsFunction: cleanedData.entityIdsFunction, + memberProfilesTableId: cleanedData.memberProfilesTableId, }, select: { id: true, @@ -540,6 +552,7 @@ async function handleCreate(argv: Partial>, prompter: In entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, + memberProfilesTableId: true, }, }) .execute(); @@ -769,6 +782,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'text', + name: 'memberProfilesTableId', + message: 'memberProfilesTableId', + required: false, + skipPrompt: true, + }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const cleanedData = stripUndefined(answers, fieldSchema) as MembershipsModulePatch; @@ -809,6 +829,7 @@ async function handleUpdate(argv: Partial>, prompter: In entityIdsByMask: cleanedData.entityIdsByMask, entityIdsByPerm: cleanedData.entityIdsByPerm, entityIdsFunction: cleanedData.entityIdsFunction, + memberProfilesTableId: cleanedData.memberProfilesTableId, }, select: { id: true, @@ -842,6 +863,7 @@ async function handleUpdate(argv: Partial>, prompter: In entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, + memberProfilesTableId: true, }, }) .execute(); diff --git a/sdk/constructive-cli/src/public/cli/commands/org-member-profile.ts b/sdk/constructive-cli/src/public/cli/commands/org-member-profile.ts new file mode 100644 index 000000000..eddfe0d5f --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/org-member-profile.ts @@ -0,0 +1,413 @@ +/** + * CLI commands for OrgMemberProfile + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer, extractFirst } from 'inquirerer'; +import { getClient } from '../executor'; +import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; +import type { FieldSchema } from '../utils'; +import type { + CreateOrgMemberProfileInput, + OrgMemberProfilePatch, + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + createdAt: 'string', + updatedAt: 'string', + membershipId: 'uuid', + entityId: 'uuid', + actorId: 'uuid', + displayName: 'string', + email: 'string', + title: 'string', + bio: 'string', + profilePicture: 'string', +}; +const usage = + '\norg-member-profile \n\nCommands:\n list List orgMemberProfile records\n find-first Find first matching orgMemberProfile record\n get Get a orgMemberProfile by ID\n create Create a new orgMemberProfile\n update Update an existing orgMemberProfile\n delete Delete a orgMemberProfile\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + if (argv.help || argv.h) { + console.log(usage); + process.exit(0); + } + const { first: subcommand, newArgv } = extractFirst(argv); + if (!subcommand) { + const answer = await prompter.prompt(argv, [ + { + type: 'autocomplete', + name: 'subcommand', + message: 'What do you want to do?', + options: ['list', 'find-first', 'get', 'create', 'update', 'delete'], + }, + ]); + return handleTableSubcommand(answer.subcommand as string, newArgv, prompter); + } + return handleTableSubcommand(subcommand, newArgv, prompter); +}; +async function handleTableSubcommand( + subcommand: string, + argv: Partial>, + prompter: Inquirerer +) { + switch (subcommand) { + case 'list': + return handleList(argv, prompter); + case 'find-first': + return handleFindFirst(argv, prompter); + case 'get': + return handleGet(argv, prompter); + case 'create': + return handleCreate(argv, prompter); + case 'update': + return handleUpdate(argv, prompter); + case 'delete': + return handleDelete(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + createdAt: true, + updatedAt: true, + membershipId: true, + entityId: true, + actorId: true, + displayName: true, + email: true, + title: true, + bio: true, + profilePicture: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: OrgMemberProfileSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.orgMemberProfile.findMany(findManyArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to list records.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleFindFirst(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + createdAt: true, + updatedAt: true, + membershipId: true, + entityId: true, + actorId: true, + displayName: true, + email: true, + title: true, + bio: true, + profilePicture: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: OrgMemberProfileSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.orgMemberProfile.findFirst(findFirstArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to find record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleGet(argv: Partial>, prompter: Inquirerer) { + try { + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const client = getClient(); + const result = await client.orgMemberProfile + .findOne({ + id: answers.id as string, + select: { + id: true, + createdAt: true, + updatedAt: true, + membershipId: true, + entityId: true, + actorId: true, + displayName: true, + email: true, + title: true, + bio: true, + profilePicture: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Record not found.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'membershipId', + message: 'membershipId', + required: true, + }, + { + type: 'text', + name: 'entityId', + message: 'entityId', + required: true, + }, + { + type: 'text', + name: 'actorId', + message: 'actorId', + required: true, + }, + { + type: 'text', + name: 'displayName', + message: 'displayName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'email', + message: 'email', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'title', + message: 'title', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'bio', + message: 'bio', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'profilePicture', + message: 'profilePicture', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateOrgMemberProfileInput['orgMemberProfile']; + const client = getClient(); + const result = await client.orgMemberProfile + .create({ + data: { + membershipId: cleanedData.membershipId, + entityId: cleanedData.entityId, + actorId: cleanedData.actorId, + displayName: cleanedData.displayName, + email: cleanedData.email, + title: cleanedData.title, + bio: cleanedData.bio, + profilePicture: cleanedData.profilePicture, + }, + select: { + id: true, + createdAt: true, + updatedAt: true, + membershipId: true, + entityId: true, + actorId: true, + displayName: true, + email: true, + title: true, + bio: true, + profilePicture: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to create record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleUpdate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + { + type: 'text', + name: 'membershipId', + message: 'membershipId', + required: false, + }, + { + type: 'text', + name: 'entityId', + message: 'entityId', + required: false, + }, + { + type: 'text', + name: 'actorId', + message: 'actorId', + required: false, + }, + { + type: 'text', + name: 'displayName', + message: 'displayName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'email', + message: 'email', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'title', + message: 'title', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'bio', + message: 'bio', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'profilePicture', + message: 'profilePicture', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as OrgMemberProfilePatch; + const client = getClient(); + const result = await client.orgMemberProfile + .update({ + where: { + id: answers.id as string, + }, + data: { + membershipId: cleanedData.membershipId, + entityId: cleanedData.entityId, + actorId: cleanedData.actorId, + displayName: cleanedData.displayName, + email: cleanedData.email, + title: cleanedData.title, + bio: cleanedData.bio, + profilePicture: cleanedData.profilePicture, + }, + select: { + id: true, + createdAt: true, + updatedAt: true, + membershipId: true, + entityId: true, + actorId: true, + displayName: true, + email: true, + title: true, + bio: true, + profilePicture: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to update record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleDelete(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const client = getClient(); + const result = await client.orgMemberProfile + .delete({ + where: { + id: answers.id as string, + }, + select: { + id: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to delete record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} diff --git a/sdk/constructive-cli/src/public/cli/commands/org-membership.ts b/sdk/constructive-cli/src/public/cli/commands/org-membership.ts index 0810171d5..a1bb84dcd 100644 --- a/sdk/constructive-cli/src/public/cli/commands/org-membership.ts +++ b/sdk/constructive-cli/src/public/cli/commands/org-membership.ts @@ -25,12 +25,14 @@ const fieldSchema: FieldSchema = { isBanned: 'boolean', isDisabled: 'boolean', isActive: 'boolean', + isExternal: 'boolean', isOwner: 'boolean', isAdmin: 'boolean', permissions: 'string', granted: 'string', actorId: 'uuid', entityId: 'uuid', + isReadOnly: 'boolean', profileId: 'uuid', }; const usage = @@ -93,12 +95,14 @@ async function handleList(argv: Partial>, _prompter: Inq isBanned: true, isDisabled: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, + isReadOnly: true, profileId: true, }; const findManyArgs = parseFindManyArgs< @@ -129,12 +133,14 @@ async function handleFindFirst(argv: Partial>, _prompter isBanned: true, isDisabled: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, + isReadOnly: true, profileId: true, }; const findFirstArgs = parseFindFirstArgs< @@ -177,12 +183,14 @@ async function handleGet(argv: Partial>, prompter: Inqui isBanned: true, isDisabled: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, + isReadOnly: true, profileId: true, }, }) @@ -241,6 +249,13 @@ async function handleCreate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'boolean', + name: 'isExternal', + message: 'isExternal', + required: false, + skipPrompt: true, + }, { type: 'boolean', name: 'isOwner', @@ -281,6 +296,13 @@ async function handleCreate(argv: Partial>, prompter: In message: 'entityId', required: true, }, + { + type: 'boolean', + name: 'isReadOnly', + message: 'isReadOnly', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'profileId', @@ -304,12 +326,14 @@ async function handleCreate(argv: Partial>, prompter: In isBanned: cleanedData.isBanned, isDisabled: cleanedData.isDisabled, isActive: cleanedData.isActive, + isExternal: cleanedData.isExternal, isOwner: cleanedData.isOwner, isAdmin: cleanedData.isAdmin, permissions: cleanedData.permissions, granted: cleanedData.granted, actorId: cleanedData.actorId, entityId: cleanedData.entityId, + isReadOnly: cleanedData.isReadOnly, profileId: cleanedData.profileId, }, select: { @@ -322,12 +346,14 @@ async function handleCreate(argv: Partial>, prompter: In isBanned: true, isDisabled: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, + isReadOnly: true, profileId: true, }, }) @@ -392,6 +418,13 @@ async function handleUpdate(argv: Partial>, prompter: In required: false, skipPrompt: true, }, + { + type: 'boolean', + name: 'isExternal', + message: 'isExternal', + required: false, + skipPrompt: true, + }, { type: 'boolean', name: 'isOwner', @@ -432,6 +465,13 @@ async function handleUpdate(argv: Partial>, prompter: In message: 'entityId', required: false, }, + { + type: 'boolean', + name: 'isReadOnly', + message: 'isReadOnly', + required: false, + skipPrompt: true, + }, { type: 'text', name: 'profileId', @@ -455,12 +495,14 @@ async function handleUpdate(argv: Partial>, prompter: In isBanned: cleanedData.isBanned, isDisabled: cleanedData.isDisabled, isActive: cleanedData.isActive, + isExternal: cleanedData.isExternal, isOwner: cleanedData.isOwner, isAdmin: cleanedData.isAdmin, permissions: cleanedData.permissions, granted: cleanedData.granted, actorId: cleanedData.actorId, entityId: cleanedData.entityId, + isReadOnly: cleanedData.isReadOnly, profileId: cleanedData.profileId, }, select: { @@ -473,12 +515,14 @@ async function handleUpdate(argv: Partial>, prompter: In isBanned: true, isDisabled: true, isActive: true, + isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, + isReadOnly: true, profileId: true, }, }) diff --git a/sdk/constructive-cli/src/public/cli/commands/provision-new-user.ts b/sdk/constructive-cli/src/public/cli/commands/provision-new-user.ts new file mode 100644 index 000000000..862bbf919 --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/provision-new-user.ts @@ -0,0 +1,51 @@ +/** + * CLI command for mutation provisionNewUser + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { ProvisionNewUserVariables } from '../../orm/mutation'; +import type { ProvisionNewUserPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('provision-new-user - provisionNewUser\n\nUsage: provision-new-user [OPTIONS]\n'); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .provisionNewUser( + parsedAnswers as unknown as ProvisionNewUserVariables, + { + select: selectFields, + } as unknown as { + select: ProvisionNewUserPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: provisionNewUser'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/public/cli/commands/provision-spatial-relation.ts b/sdk/constructive-cli/src/public/cli/commands/provision-spatial-relation.ts new file mode 100644 index 000000000..fd46815bb --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/provision-spatial-relation.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation provisionSpatialRelation + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { ProvisionSpatialRelationVariables } from '../../orm/mutation'; +import type { ProvisionSpatialRelationPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'provision-spatial-relation - Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin \u2194 param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist \u2014 this is a metadata-only insert.\n\nUsage: provision-spatial-relation [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .provisionSpatialRelation( + parsedAnswers as unknown as ProvisionSpatialRelationVariables, + { + select: selectFields, + } as unknown as { + select: ProvisionSpatialRelationPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: provisionSpatialRelation'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/public/cli/commands/request-cross-origin-token.ts b/sdk/constructive-cli/src/public/cli/commands/request-cross-origin-token.ts new file mode 100644 index 000000000..344a44b85 --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/request-cross-origin-token.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation requestCrossOriginToken + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { RequestCrossOriginTokenVariables } from '../../orm/mutation'; +import type { RequestCrossOriginTokenPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'request-cross-origin-token - requestCrossOriginToken\n\nUsage: request-cross-origin-token [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .requestCrossOriginToken( + parsedAnswers as unknown as RequestCrossOriginTokenVariables, + { + select: selectFields, + } as unknown as { + select: RequestCrossOriginTokenPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: requestCrossOriginToken'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/public/cli/commands/require-step-up.ts b/sdk/constructive-cli/src/public/cli/commands/require-step-up.ts new file mode 100644 index 000000000..9720978f4 --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/require-step-up.ts @@ -0,0 +1,38 @@ +/** + * CLI command for query requireStepUp + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import type { RequireStepUpVariables } from '../../orm/query'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('require-step-up - requireStepUp\n\nUsage: require-step-up [OPTIONS]\n'); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'stepUpType', + message: 'stepUpType', + }, + ]); + const client = getClient(); + const result = await client.query + .requireStepUp(answers as unknown as RequireStepUpVariables) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: requireStepUp'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/public/cli/commands/resolve-blueprint-field.ts b/sdk/constructive-cli/src/public/cli/commands/resolve-blueprint-field.ts new file mode 100644 index 000000000..ee91bdc0f --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/resolve-blueprint-field.ts @@ -0,0 +1,50 @@ +/** + * CLI command for query resolveBlueprintField + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import type { ResolveBlueprintFieldVariables } from '../../orm/query'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'resolve-blueprint-field - Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this.\n\nUsage: resolve-blueprint-field [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + }, + { + type: 'text', + name: 'tableId', + message: 'tableId', + }, + { + type: 'text', + name: 'fieldName', + message: 'fieldName', + }, + ]); + const client = getClient(); + const result = await client.query + .resolveBlueprintField(answers as unknown as ResolveBlueprintFieldVariables) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: resolveBlueprintField'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/public/cli/commands/revoke-api-key.ts b/sdk/constructive-cli/src/public/cli/commands/revoke-api-key.ts new file mode 100644 index 000000000..0f159c401 --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/revoke-api-key.ts @@ -0,0 +1,51 @@ +/** + * CLI command for mutation revokeApiKey + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { RevokeApiKeyVariables } from '../../orm/mutation'; +import type { RevokeApiKeyPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('revoke-api-key - revokeApiKey\n\nUsage: revoke-api-key [OPTIONS]\n'); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .revokeApiKey( + parsedAnswers as unknown as RevokeApiKeyVariables, + { + select: selectFields, + } as unknown as { + select: RevokeApiKeyPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: revokeApiKey'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/public/cli/commands/revoke-session.ts b/sdk/constructive-cli/src/public/cli/commands/revoke-session.ts new file mode 100644 index 000000000..8b3bc5036 --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/revoke-session.ts @@ -0,0 +1,51 @@ +/** + * CLI command for mutation revokeSession + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { RevokeSessionVariables } from '../../orm/mutation'; +import type { RevokeSessionPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log('revoke-session - revokeSession\n\nUsage: revoke-session [OPTIONS]\n'); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .revokeSession( + parsedAnswers as unknown as RevokeSessionVariables, + { + select: selectFields, + } as unknown as { + select: RevokeSessionPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: revokeSession'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/auth/cli/commands/connected-account.ts b/sdk/constructive-cli/src/public/cli/commands/session-secrets-module.ts similarity index 58% rename from sdk/constructive-cli/src/auth/cli/commands/connected-account.ts rename to sdk/constructive-cli/src/public/cli/commands/session-secrets-module.ts index 5522a3457..d161b2b4c 100644 --- a/sdk/constructive-cli/src/auth/cli/commands/connected-account.ts +++ b/sdk/constructive-cli/src/public/cli/commands/session-secrets-module.ts @@ -1,5 +1,5 @@ /** - * CLI commands for ConnectedAccount + * CLI commands for SessionSecretsModule * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -8,25 +8,23 @@ import { getClient } from '../executor'; import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; import type { FieldSchema } from '../utils'; import type { - CreateConnectedAccountInput, - ConnectedAccountPatch, - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy, + CreateSessionSecretsModuleInput, + SessionSecretsModulePatch, + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy, } from '../../orm/input-types'; import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; const fieldSchema: FieldSchema = { id: 'uuid', - ownerId: 'uuid', - service: 'string', - identifier: 'string', - details: 'json', - isVerified: 'boolean', - createdAt: 'string', - updatedAt: 'string', + databaseId: 'uuid', + schemaId: 'uuid', + tableId: 'uuid', + tableName: 'string', + sessionsTableId: 'uuid', }; const usage = - '\nconnected-account \n\nCommands:\n list List connectedAccount records\n find-first Find first matching connectedAccount record\n get Get a connectedAccount by ID\n create Create a new connectedAccount\n update Update an existing connectedAccount\n delete Delete a connectedAccount\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nsession-secrets-module \n\nCommands:\n list List sessionSecretsModule records\n find-first Find first matching sessionSecretsModule record\n get Get a sessionSecretsModule by ID\n create Create a new sessionSecretsModule\n update Update an existing sessionSecretsModule\n delete Delete a sessionSecretsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -77,21 +75,23 @@ async function handleList(argv: Partial>, _prompter: Inq try { const defaultSelect = { id: true, - ownerId: true, - service: true, - identifier: true, - details: true, - isVerified: true, - createdAt: true, - updatedAt: true, + databaseId: true, + schemaId: true, + tableId: true, + tableName: true, + sessionsTableId: true, }; const findManyArgs = parseFindManyArgs< - FindManyArgs & { - select: ConnectedAccountSelect; + FindManyArgs< + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy + > & { + select: SessionSecretsModuleSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.connectedAccount.findMany(findManyArgs).execute(); + const result = await client.sessionSecretsModule.findMany(findManyArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to list records.'); @@ -105,21 +105,19 @@ async function handleFindFirst(argv: Partial>, _prompter try { const defaultSelect = { id: true, - ownerId: true, - service: true, - identifier: true, - details: true, - isVerified: true, - createdAt: true, - updatedAt: true, + databaseId: true, + schemaId: true, + tableId: true, + tableName: true, + sessionsTableId: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { - select: ConnectedAccountSelect; + FindFirstArgs & { + select: SessionSecretsModuleSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.connectedAccount.findFirst(findFirstArgs).execute(); + const result = await client.sessionSecretsModule.findFirst(findFirstArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to find record.'); @@ -140,18 +138,16 @@ async function handleGet(argv: Partial>, prompter: Inqui }, ]); const client = getClient(); - const result = await client.connectedAccount + const result = await client.sessionSecretsModule .findOne({ id: answers.id as string, select: { id: true, - ownerId: true, - service: true, - identifier: true, - details: true, - isVerified: true, - createdAt: true, - updatedAt: true, + databaseId: true, + schemaId: true, + tableId: true, + tableName: true, + sessionsTableId: true, }, }) .execute(); @@ -169,33 +165,35 @@ async function handleCreate(argv: Partial>, prompter: In const rawAnswers = await prompter.prompt(argv, [ { type: 'text', - name: 'ownerId', - message: 'ownerId', - required: false, - skipPrompt: true, + name: 'databaseId', + message: 'databaseId', + required: true, }, { type: 'text', - name: 'service', - message: 'service', - required: true, + name: 'schemaId', + message: 'schemaId', + required: false, + skipPrompt: true, }, { type: 'text', - name: 'identifier', - message: 'identifier', - required: true, + name: 'tableId', + message: 'tableId', + required: false, + skipPrompt: true, }, { - type: 'json', - name: 'details', - message: 'details', - required: true, + type: 'text', + name: 'tableName', + message: 'tableName', + required: false, + skipPrompt: true, }, { - type: 'boolean', - name: 'isVerified', - message: 'isVerified', + type: 'text', + name: 'sessionsTableId', + message: 'sessionsTableId', required: false, skipPrompt: true, }, @@ -204,26 +202,24 @@ async function handleCreate(argv: Partial>, prompter: In const cleanedData = stripUndefined( answers, fieldSchema - ) as CreateConnectedAccountInput['connectedAccount']; + ) as CreateSessionSecretsModuleInput['sessionSecretsModule']; const client = getClient(); - const result = await client.connectedAccount + const result = await client.sessionSecretsModule .create({ data: { - ownerId: cleanedData.ownerId, - service: cleanedData.service, - identifier: cleanedData.identifier, - details: cleanedData.details, - isVerified: cleanedData.isVerified, + databaseId: cleanedData.databaseId, + schemaId: cleanedData.schemaId, + tableId: cleanedData.tableId, + tableName: cleanedData.tableName, + sessionsTableId: cleanedData.sessionsTableId, }, select: { id: true, - ownerId: true, - service: true, - identifier: true, - details: true, - isVerified: true, - createdAt: true, - updatedAt: true, + databaseId: true, + schemaId: true, + tableId: true, + tableName: true, + sessionsTableId: true, }, }) .execute(); @@ -247,61 +243,61 @@ async function handleUpdate(argv: Partial>, prompter: In }, { type: 'text', - name: 'ownerId', - message: 'ownerId', + name: 'databaseId', + message: 'databaseId', required: false, - skipPrompt: true, }, { type: 'text', - name: 'service', - message: 'service', + name: 'schemaId', + message: 'schemaId', required: false, + skipPrompt: true, }, { type: 'text', - name: 'identifier', - message: 'identifier', + name: 'tableId', + message: 'tableId', required: false, + skipPrompt: true, }, { - type: 'json', - name: 'details', - message: 'details', + type: 'text', + name: 'tableName', + message: 'tableName', required: false, + skipPrompt: true, }, { - type: 'boolean', - name: 'isVerified', - message: 'isVerified', + type: 'text', + name: 'sessionsTableId', + message: 'sessionsTableId', required: false, skipPrompt: true, }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined(answers, fieldSchema) as ConnectedAccountPatch; + const cleanedData = stripUndefined(answers, fieldSchema) as SessionSecretsModulePatch; const client = getClient(); - const result = await client.connectedAccount + const result = await client.sessionSecretsModule .update({ where: { id: answers.id as string, }, data: { - ownerId: cleanedData.ownerId, - service: cleanedData.service, - identifier: cleanedData.identifier, - details: cleanedData.details, - isVerified: cleanedData.isVerified, + databaseId: cleanedData.databaseId, + schemaId: cleanedData.schemaId, + tableId: cleanedData.tableId, + tableName: cleanedData.tableName, + sessionsTableId: cleanedData.sessionsTableId, }, select: { id: true, - ownerId: true, - service: true, - identifier: true, - details: true, - isVerified: true, - createdAt: true, - updatedAt: true, + databaseId: true, + schemaId: true, + tableId: true, + tableName: true, + sessionsTableId: true, }, }) .execute(); @@ -326,7 +322,7 @@ async function handleDelete(argv: Partial>, prompter: In ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const client = getClient(); - const result = await client.connectedAccount + const result = await client.sessionSecretsModule .delete({ where: { id: answers.id as string, diff --git a/sdk/constructive-cli/src/public/cli/commands/sign-in-cross-origin.ts b/sdk/constructive-cli/src/public/cli/commands/sign-in-cross-origin.ts new file mode 100644 index 000000000..33c90f1f4 --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/sign-in-cross-origin.ts @@ -0,0 +1,53 @@ +/** + * CLI command for mutation signInCrossOrigin + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer } from 'inquirerer'; +import { getClient } from '../executor'; +import { unflattenDotNotation, buildSelectFromPaths } from '../utils'; +import type { SignInCrossOriginVariables } from '../../orm/mutation'; +import type { SignInCrossOriginPayloadSelect } from '../../orm/input-types'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + try { + if (argv.help || argv.h) { + console.log( + 'sign-in-cross-origin - signInCrossOrigin\n\nUsage: sign-in-cross-origin [OPTIONS]\n' + ); + process.exit(0); + } + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'input', + message: + 'The exclusive input argument for this mutation. An object type, make sure to see documentation for this object\u2019s fields.', + required: true, + }, + ]); + const client = getClient(); + const parsedAnswers = unflattenDotNotation(answers); + const selectFields = buildSelectFromPaths((argv.select as string) ?? 'clientMutationId'); + const result = await client.mutation + .signInCrossOrigin( + parsedAnswers as unknown as SignInCrossOriginVariables, + { + select: selectFields, + } as unknown as { + select: SignInCrossOriginPayloadSelect; + } + ) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed: signInCrossOrigin'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +}; diff --git a/sdk/constructive-cli/src/public/cli/commands/spatial-relation.ts b/sdk/constructive-cli/src/public/cli/commands/spatial-relation.ts new file mode 100644 index 000000000..ea7555555 --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/spatial-relation.ts @@ -0,0 +1,495 @@ +/** + * CLI commands for SpatialRelation + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer, extractFirst } from 'inquirerer'; +import { getClient } from '../executor'; +import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; +import type { FieldSchema } from '../utils'; +import type { + CreateSpatialRelationInput, + SpatialRelationPatch, + SpatialRelationSelect, + SpatialRelationFilter, + SpatialRelationOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + databaseId: 'uuid', + tableId: 'uuid', + fieldId: 'uuid', + refTableId: 'uuid', + refFieldId: 'uuid', + name: 'string', + operator: 'string', + paramName: 'string', + category: 'string', + module: 'string', + scope: 'int', + tags: 'string', + createdAt: 'string', + updatedAt: 'string', +}; +const usage = + '\nspatial-relation \n\nCommands:\n list List spatialRelation records\n find-first Find first matching spatialRelation record\n get Get a spatialRelation by ID\n create Create a new spatialRelation\n update Update an existing spatialRelation\n delete Delete a spatialRelation\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + if (argv.help || argv.h) { + console.log(usage); + process.exit(0); + } + const { first: subcommand, newArgv } = extractFirst(argv); + if (!subcommand) { + const answer = await prompter.prompt(argv, [ + { + type: 'autocomplete', + name: 'subcommand', + message: 'What do you want to do?', + options: ['list', 'find-first', 'get', 'create', 'update', 'delete'], + }, + ]); + return handleTableSubcommand(answer.subcommand as string, newArgv, prompter); + } + return handleTableSubcommand(subcommand, newArgv, prompter); +}; +async function handleTableSubcommand( + subcommand: string, + argv: Partial>, + prompter: Inquirerer +) { + switch (subcommand) { + case 'list': + return handleList(argv, prompter); + case 'find-first': + return handleFindFirst(argv, prompter); + case 'get': + return handleGet(argv, prompter); + case 'create': + return handleCreate(argv, prompter); + case 'update': + return handleUpdate(argv, prompter); + case 'delete': + return handleDelete(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + databaseId: true, + tableId: true, + fieldId: true, + refTableId: true, + refFieldId: true, + name: true, + operator: true, + paramName: true, + category: true, + module: true, + scope: true, + tags: true, + createdAt: true, + updatedAt: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs & { + select: SpatialRelationSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.spatialRelation.findMany(findManyArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to list records.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleFindFirst(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + databaseId: true, + tableId: true, + fieldId: true, + refTableId: true, + refFieldId: true, + name: true, + operator: true, + paramName: true, + category: true, + module: true, + scope: true, + tags: true, + createdAt: true, + updatedAt: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: SpatialRelationSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.spatialRelation.findFirst(findFirstArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to find record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleGet(argv: Partial>, prompter: Inquirerer) { + try { + const answers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const client = getClient(); + const result = await client.spatialRelation + .findOne({ + id: answers.id as string, + select: { + id: true, + databaseId: true, + tableId: true, + fieldId: true, + refTableId: true, + refFieldId: true, + name: true, + operator: true, + paramName: true, + category: true, + module: true, + scope: true, + tags: true, + createdAt: true, + updatedAt: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Record not found.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'tableId', + message: 'tableId', + required: true, + }, + { + type: 'text', + name: 'fieldId', + message: 'fieldId', + required: true, + }, + { + type: 'text', + name: 'refTableId', + message: 'refTableId', + required: true, + }, + { + type: 'text', + name: 'refFieldId', + message: 'refFieldId', + required: true, + }, + { + type: 'text', + name: 'name', + message: 'name', + required: true, + }, + { + type: 'text', + name: 'operator', + message: 'operator', + required: true, + }, + { + type: 'text', + name: 'paramName', + message: 'paramName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'category', + message: 'category', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'module', + message: 'module', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'scope', + message: 'scope', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'tags', + message: 'tags', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateSpatialRelationInput['spatialRelation']; + const client = getClient(); + const result = await client.spatialRelation + .create({ + data: { + databaseId: cleanedData.databaseId, + tableId: cleanedData.tableId, + fieldId: cleanedData.fieldId, + refTableId: cleanedData.refTableId, + refFieldId: cleanedData.refFieldId, + name: cleanedData.name, + operator: cleanedData.operator, + paramName: cleanedData.paramName, + category: cleanedData.category, + module: cleanedData.module, + scope: cleanedData.scope, + tags: cleanedData.tags, + }, + select: { + id: true, + databaseId: true, + tableId: true, + fieldId: true, + refTableId: true, + refFieldId: true, + name: true, + operator: true, + paramName: true, + category: true, + module: true, + scope: true, + tags: true, + createdAt: true, + updatedAt: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to create record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleUpdate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + { + type: 'text', + name: 'databaseId', + message: 'databaseId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'tableId', + message: 'tableId', + required: false, + }, + { + type: 'text', + name: 'fieldId', + message: 'fieldId', + required: false, + }, + { + type: 'text', + name: 'refTableId', + message: 'refTableId', + required: false, + }, + { + type: 'text', + name: 'refFieldId', + message: 'refFieldId', + required: false, + }, + { + type: 'text', + name: 'name', + message: 'name', + required: false, + }, + { + type: 'text', + name: 'operator', + message: 'operator', + required: false, + }, + { + type: 'text', + name: 'paramName', + message: 'paramName', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'category', + message: 'category', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'module', + message: 'module', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'scope', + message: 'scope', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'tags', + message: 'tags', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined(answers, fieldSchema) as SpatialRelationPatch; + const client = getClient(); + const result = await client.spatialRelation + .update({ + where: { + id: answers.id as string, + }, + data: { + databaseId: cleanedData.databaseId, + tableId: cleanedData.tableId, + fieldId: cleanedData.fieldId, + refTableId: cleanedData.refTableId, + refFieldId: cleanedData.refFieldId, + name: cleanedData.name, + operator: cleanedData.operator, + paramName: cleanedData.paramName, + category: cleanedData.category, + module: cleanedData.module, + scope: cleanedData.scope, + tags: cleanedData.tags, + }, + select: { + id: true, + databaseId: true, + tableId: true, + fieldId: true, + refTableId: true, + refFieldId: true, + name: true, + operator: true, + paramName: true, + category: true, + module: true, + scope: true, + tags: true, + createdAt: true, + updatedAt: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to update record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleDelete(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'id', + message: 'id', + required: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const client = getClient(); + const result = await client.spatialRelation + .delete({ + where: { + id: answers.id as string, + }, + select: { + id: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to delete record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} diff --git a/sdk/constructive-cli/src/public/cli/commands/user-auth-module.ts b/sdk/constructive-cli/src/public/cli/commands/user-auth-module.ts index 0ae292f23..1450ac267 100644 --- a/sdk/constructive-cli/src/public/cli/commands/user-auth-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/user-auth-module.ts @@ -39,8 +39,8 @@ const fieldSchema: FieldSchema = { checkPasswordFunction: 'string', sendAccountDeletionEmailFunction: 'string', deleteAccountFunction: 'string', - signInOneTimeTokenFunction: 'string', - oneTimeTokenFunction: 'string', + signInCrossOriginFunction: 'string', + requestCrossOriginTokenFunction: 'string', extendTokenExpires: 'string', }; const usage = @@ -117,8 +117,8 @@ async function handleList(argv: Partial>, _prompter: Inq checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, - signInOneTimeTokenFunction: true, - oneTimeTokenFunction: true, + signInCrossOriginFunction: true, + requestCrossOriginTokenFunction: true, extendTokenExpires: true, }; const findManyArgs = parseFindManyArgs< @@ -163,8 +163,8 @@ async function handleFindFirst(argv: Partial>, _prompter checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, - signInOneTimeTokenFunction: true, - oneTimeTokenFunction: true, + signInCrossOriginFunction: true, + requestCrossOriginTokenFunction: true, extendTokenExpires: true, }; const findFirstArgs = parseFindFirstArgs< @@ -221,8 +221,8 @@ async function handleGet(argv: Partial>, prompter: Inqui checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, - signInOneTimeTokenFunction: true, - oneTimeTokenFunction: true, + signInCrossOriginFunction: true, + requestCrossOriginTokenFunction: true, extendTokenExpires: true, }, }) @@ -394,15 +394,15 @@ async function handleCreate(argv: Partial>, prompter: In }, { type: 'text', - name: 'signInOneTimeTokenFunction', - message: 'signInOneTimeTokenFunction', + name: 'signInCrossOriginFunction', + message: 'signInCrossOriginFunction', required: false, skipPrompt: true, }, { type: 'text', - name: 'oneTimeTokenFunction', - message: 'oneTimeTokenFunction', + name: 'requestCrossOriginTokenFunction', + message: 'requestCrossOriginTokenFunction', required: false, skipPrompt: true, }, @@ -445,8 +445,8 @@ async function handleCreate(argv: Partial>, prompter: In checkPasswordFunction: cleanedData.checkPasswordFunction, sendAccountDeletionEmailFunction: cleanedData.sendAccountDeletionEmailFunction, deleteAccountFunction: cleanedData.deleteAccountFunction, - signInOneTimeTokenFunction: cleanedData.signInOneTimeTokenFunction, - oneTimeTokenFunction: cleanedData.oneTimeTokenFunction, + signInCrossOriginFunction: cleanedData.signInCrossOriginFunction, + requestCrossOriginTokenFunction: cleanedData.requestCrossOriginTokenFunction, extendTokenExpires: cleanedData.extendTokenExpires, }, select: { @@ -473,8 +473,8 @@ async function handleCreate(argv: Partial>, prompter: In checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, - signInOneTimeTokenFunction: true, - oneTimeTokenFunction: true, + signInCrossOriginFunction: true, + requestCrossOriginTokenFunction: true, extendTokenExpires: true, }, }) @@ -652,15 +652,15 @@ async function handleUpdate(argv: Partial>, prompter: In }, { type: 'text', - name: 'signInOneTimeTokenFunction', - message: 'signInOneTimeTokenFunction', + name: 'signInCrossOriginFunction', + message: 'signInCrossOriginFunction', required: false, skipPrompt: true, }, { type: 'text', - name: 'oneTimeTokenFunction', - message: 'oneTimeTokenFunction', + name: 'requestCrossOriginTokenFunction', + message: 'requestCrossOriginTokenFunction', required: false, skipPrompt: true, }, @@ -703,8 +703,8 @@ async function handleUpdate(argv: Partial>, prompter: In checkPasswordFunction: cleanedData.checkPasswordFunction, sendAccountDeletionEmailFunction: cleanedData.sendAccountDeletionEmailFunction, deleteAccountFunction: cleanedData.deleteAccountFunction, - signInOneTimeTokenFunction: cleanedData.signInOneTimeTokenFunction, - oneTimeTokenFunction: cleanedData.oneTimeTokenFunction, + signInCrossOriginFunction: cleanedData.signInCrossOriginFunction, + requestCrossOriginTokenFunction: cleanedData.requestCrossOriginTokenFunction, extendTokenExpires: cleanedData.extendTokenExpires, }, select: { @@ -731,8 +731,8 @@ async function handleUpdate(argv: Partial>, prompter: In checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, - signInOneTimeTokenFunction: true, - oneTimeTokenFunction: true, + signInCrossOriginFunction: true, + requestCrossOriginTokenFunction: true, extendTokenExpires: true, }, }) diff --git a/sdk/constructive-cli/src/public/cli/commands/user-connected-account.ts b/sdk/constructive-cli/src/public/cli/commands/user-connected-account.ts new file mode 100644 index 000000000..26fd78bcf --- /dev/null +++ b/sdk/constructive-cli/src/public/cli/commands/user-connected-account.ts @@ -0,0 +1,204 @@ +/** + * CLI commands for UserConnectedAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { CLIOptions, Inquirerer, extractFirst } from 'inquirerer'; +import { getClient } from '../executor'; +import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; +import type { FieldSchema } from '../utils'; +import type { + CreateUserConnectedAccountInput, + UserConnectedAccountPatch, + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, +} from '../../orm/input-types'; +import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; +const fieldSchema: FieldSchema = { + id: 'uuid', + ownerId: 'uuid', + service: 'string', + identifier: 'string', + details: 'json', + isVerified: 'boolean', + createdAt: 'string', + updatedAt: 'string', +}; +const usage = + '\nuser-connected-account \n\nCommands:\n list List userConnectedAccount records\n find-first Find first matching userConnectedAccount record\n create Create a new userConnectedAccount\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; +export default async ( + argv: Partial>, + prompter: Inquirerer, + _options: CLIOptions +) => { + if (argv.help || argv.h) { + console.log(usage); + process.exit(0); + } + const { first: subcommand, newArgv } = extractFirst(argv); + if (!subcommand) { + const answer = await prompter.prompt(argv, [ + { + type: 'autocomplete', + name: 'subcommand', + message: 'What do you want to do?', + options: ['list', 'find-first', 'create'], + }, + ]); + return handleTableSubcommand(answer.subcommand as string, newArgv, prompter); + } + return handleTableSubcommand(subcommand, newArgv, prompter); +}; +async function handleTableSubcommand( + subcommand: string, + argv: Partial>, + prompter: Inquirerer +) { + switch (subcommand) { + case 'list': + return handleList(argv, prompter); + case 'find-first': + return handleFindFirst(argv, prompter); + case 'create': + return handleCreate(argv, prompter); + default: + console.log(usage); + process.exit(1); + } +} +async function handleList(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + ownerId: true, + service: true, + identifier: true, + details: true, + isVerified: true, + createdAt: true, + updatedAt: true, + }; + const findManyArgs = parseFindManyArgs< + FindManyArgs< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + > & { + select: UserConnectedAccountSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.userConnectedAccount.findMany(findManyArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to list records.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleFindFirst(argv: Partial>, _prompter: Inquirerer) { + try { + const defaultSelect = { + id: true, + ownerId: true, + service: true, + identifier: true, + details: true, + isVerified: true, + createdAt: true, + updatedAt: true, + }; + const findFirstArgs = parseFindFirstArgs< + FindFirstArgs & { + select: UserConnectedAccountSelect; + } + >(argv, defaultSelect); + const client = getClient(); + const result = await client.userConnectedAccount.findFirst(findFirstArgs).execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to find record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} +async function handleCreate(argv: Partial>, prompter: Inquirerer) { + try { + const rawAnswers = await prompter.prompt(argv, [ + { + type: 'text', + name: 'ownerId', + message: 'ownerId', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'service', + message: 'service', + required: false, + skipPrompt: true, + }, + { + type: 'text', + name: 'identifier', + message: 'identifier', + required: false, + skipPrompt: true, + }, + { + type: 'json', + name: 'details', + message: 'details', + required: false, + skipPrompt: true, + }, + { + type: 'boolean', + name: 'isVerified', + message: 'isVerified', + required: false, + skipPrompt: true, + }, + ]); + const answers = coerceAnswers(rawAnswers, fieldSchema); + const cleanedData = stripUndefined( + answers, + fieldSchema + ) as CreateUserConnectedAccountInput['userConnectedAccount']; + const client = getClient(); + const result = await client.userConnectedAccount + .create({ + data: { + ownerId: cleanedData.ownerId, + service: cleanedData.service, + identifier: cleanedData.identifier, + details: cleanedData.details, + isVerified: cleanedData.isVerified, + }, + select: { + id: true, + ownerId: true, + service: true, + identifier: true, + details: true, + isVerified: true, + createdAt: true, + updatedAt: true, + }, + }) + .execute(); + console.log(JSON.stringify(result, null, 2)); + } catch (error) { + console.error('Failed to create record.'); + if (error instanceof Error) { + console.error(error.message); + } + process.exit(1); + } +} diff --git a/sdk/constructive-cli/src/public/cli/commands/table-template-module.ts b/sdk/constructive-cli/src/public/cli/commands/webauthn-credentials-module.ts similarity index 74% rename from sdk/constructive-cli/src/public/cli/commands/table-template-module.ts rename to sdk/constructive-cli/src/public/cli/commands/webauthn-credentials-module.ts index def0f01f9..087e5a19d 100644 --- a/sdk/constructive-cli/src/public/cli/commands/table-template-module.ts +++ b/sdk/constructive-cli/src/public/cli/commands/webauthn-credentials-module.ts @@ -1,5 +1,5 @@ /** - * CLI commands for TableTemplateModule + * CLI commands for WebauthnCredentialsModule * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -8,11 +8,11 @@ import { getClient } from '../executor'; import { coerceAnswers, parseFindFirstArgs, parseFindManyArgs, stripUndefined } from '../utils'; import type { FieldSchema } from '../utils'; import type { - CreateTableTemplateModuleInput, - TableTemplateModulePatch, - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy, + CreateWebauthnCredentialsModuleInput, + WebauthnCredentialsModulePatch, + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy, } from '../../orm/input-types'; import type { FindManyArgs, FindFirstArgs } from '../../orm/select-types'; const fieldSchema: FieldSchema = { @@ -23,11 +23,9 @@ const fieldSchema: FieldSchema = { tableId: 'uuid', ownerTableId: 'uuid', tableName: 'string', - nodeType: 'string', - data: 'json', }; const usage = - '\ntable-template-module \n\nCommands:\n list List tableTemplateModule records\n find-first Find first matching tableTemplateModule record\n get Get a tableTemplateModule by ID\n create Create a new tableTemplateModule\n update Update an existing tableTemplateModule\n delete Delete a tableTemplateModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; + '\nwebauthn-credentials-module \n\nCommands:\n list List webauthnCredentialsModule records\n find-first Find first matching webauthnCredentialsModule record\n get Get a webauthnCredentialsModule by ID\n create Create a new webauthnCredentialsModule\n update Update an existing webauthnCredentialsModule\n delete Delete a webauthnCredentialsModule\n\nList Options:\n --limit Max number of records to return (forward pagination)\n --last Number of records from the end (backward pagination)\n --after Cursor for forward pagination\n --before Cursor for backward pagination\n --offset Number of records to skip\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.name.equalTo foo)\n --condition.. Condition filter (dot-notation)\n --orderBy Comma-separated ordering values (e.g. NAME_ASC,CREATED_AT_DESC)\n\nFind-First Options:\n --select Comma-separated list of fields to return\n --where.. Filter (dot-notation, e.g. --where.status.equalTo active)\n --condition.. Condition filter (dot-notation)\n\n --help, -h Show this help message\n'; export default async ( argv: Partial>, prompter: Inquirerer, @@ -84,20 +82,18 @@ async function handleList(argv: Partial>, _prompter: Inq tableId: true, ownerTableId: true, tableName: true, - nodeType: true, - data: true, }; const findManyArgs = parseFindManyArgs< FindManyArgs< - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy > & { - select: TableTemplateModuleSelect; + select: WebauthnCredentialsModuleSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.tableTemplateModule.findMany(findManyArgs).execute(); + const result = await client.webauthnCredentialsModule.findMany(findManyArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to list records.'); @@ -117,16 +113,14 @@ async function handleFindFirst(argv: Partial>, _prompter tableId: true, ownerTableId: true, tableName: true, - nodeType: true, - data: true, }; const findFirstArgs = parseFindFirstArgs< - FindFirstArgs & { - select: TableTemplateModuleSelect; + FindFirstArgs & { + select: WebauthnCredentialsModuleSelect; } >(argv, defaultSelect); const client = getClient(); - const result = await client.tableTemplateModule.findFirst(findFirstArgs).execute(); + const result = await client.webauthnCredentialsModule.findFirst(findFirstArgs).execute(); console.log(JSON.stringify(result, null, 2)); } catch (error) { console.error('Failed to find record.'); @@ -147,7 +141,7 @@ async function handleGet(argv: Partial>, prompter: Inqui }, ]); const client = getClient(); - const result = await client.tableTemplateModule + const result = await client.webauthnCredentialsModule .findOne({ id: answers.id as string, select: { @@ -158,8 +152,6 @@ async function handleGet(argv: Partial>, prompter: Inqui tableId: true, ownerTableId: true, tableName: true, - nodeType: true, - data: true, }, }) .execute(); @@ -213,18 +205,6 @@ async function handleCreate(argv: Partial>, prompter: In type: 'text', name: 'tableName', message: 'tableName', - required: true, - }, - { - type: 'text', - name: 'nodeType', - message: 'nodeType', - required: true, - }, - { - type: 'json', - name: 'data', - message: 'data', required: false, skipPrompt: true, }, @@ -233,9 +213,9 @@ async function handleCreate(argv: Partial>, prompter: In const cleanedData = stripUndefined( answers, fieldSchema - ) as CreateTableTemplateModuleInput['tableTemplateModule']; + ) as CreateWebauthnCredentialsModuleInput['webauthnCredentialsModule']; const client = getClient(); - const result = await client.tableTemplateModule + const result = await client.webauthnCredentialsModule .create({ data: { databaseId: cleanedData.databaseId, @@ -244,8 +224,6 @@ async function handleCreate(argv: Partial>, prompter: In tableId: cleanedData.tableId, ownerTableId: cleanedData.ownerTableId, tableName: cleanedData.tableName, - nodeType: cleanedData.nodeType, - data: cleanedData.data, }, select: { id: true, @@ -255,8 +233,6 @@ async function handleCreate(argv: Partial>, prompter: In tableId: true, ownerTableId: true, tableName: true, - nodeType: true, - data: true, }, }) .execute(); @@ -317,25 +293,13 @@ async function handleUpdate(argv: Partial>, prompter: In name: 'tableName', message: 'tableName', required: false, - }, - { - type: 'text', - name: 'nodeType', - message: 'nodeType', - required: false, - }, - { - type: 'json', - name: 'data', - message: 'data', - required: false, skipPrompt: true, }, ]); const answers = coerceAnswers(rawAnswers, fieldSchema); - const cleanedData = stripUndefined(answers, fieldSchema) as TableTemplateModulePatch; + const cleanedData = stripUndefined(answers, fieldSchema) as WebauthnCredentialsModulePatch; const client = getClient(); - const result = await client.tableTemplateModule + const result = await client.webauthnCredentialsModule .update({ where: { id: answers.id as string, @@ -347,8 +311,6 @@ async function handleUpdate(argv: Partial>, prompter: In tableId: cleanedData.tableId, ownerTableId: cleanedData.ownerTableId, tableName: cleanedData.tableName, - nodeType: cleanedData.nodeType, - data: cleanedData.data, }, select: { id: true, @@ -358,8 +320,6 @@ async function handleUpdate(argv: Partial>, prompter: In tableId: true, ownerTableId: true, tableName: true, - nodeType: true, - data: true, }, }) .execute(); @@ -384,7 +344,7 @@ async function handleDelete(argv: Partial>, prompter: In ]); const answers = coerceAnswers(rawAnswers, fieldSchema); const client = getClient(); - const result = await client.tableTemplateModule + const result = await client.webauthnCredentialsModule .delete({ where: { id: answers.id as string, diff --git a/sdk/constructive-cli/src/public/orm/README.md b/sdk/constructive-cli/src/public/orm/README.md index 9129a2618..752e931ea 100644 --- a/sdk/constructive-cli/src/public/orm/README.md +++ b/sdk/constructive-cli/src/public/orm/README.md @@ -33,6 +33,7 @@ const db = createClient({ | `table` | findMany, findOne, create, update, delete | | `checkConstraint` | findMany, findOne, create, update, delete | | `field` | findMany, findOne, create, update, delete | +| `spatialRelation` | findMany, findOne, create, update, delete | | `foreignKeyConstraint` | findMany, findOne, create, update, delete | | `fullTextSearch` | findMany, findOne, create, update, delete | | `index` | findMany, findOne, create, update, delete | @@ -46,9 +47,9 @@ const db = createClient({ | `viewGrant` | findMany, findOne, create, update, delete | | `viewRule` | findMany, findOne, create, update, delete | | `embeddingChunk` | findMany, findOne, create, update, delete | -| `tableTemplateModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | | `relationProvision` | findMany, findOne, create, update, delete | +| `sessionSecretsModule` | findMany, findOne, create, update, delete | | `schemaGrant` | findMany, findOne, create, update, delete | | `defaultPrivilege` | findMany, findOne, create, update, delete | | `enum` | findMany, findOne, create, update, delete | @@ -86,6 +87,8 @@ const db = createClient({ | `blueprintTemplate` | findMany, findOne, create, update, delete | | `blueprintConstruction` | findMany, findOne, create, update, delete | | `storageModule` | findMany, findOne, create, update, delete | +| `entityTypeProvision` | findMany, findOne, create, update, delete | +| `webauthnCredentialsModule` | findMany, findOne, create, update, delete | | `databaseProvisionModule` | findMany, findOne, create, update, delete | | `appAdminGrant` | findMany, findOne, create, update, delete | | `appOwnerGrant` | findMany, findOne, create, update, delete | @@ -94,6 +97,7 @@ const db = createClient({ | `orgMember` | findMany, findOne, create, update, delete | | `orgAdminGrant` | findMany, findOne, create, update, delete | | `orgOwnerGrant` | findMany, findOne, create, update, delete | +| `orgMemberProfile` | findMany, findOne, create, update, delete | | `orgGrant` | findMany, findOne, create, update, delete | | `orgChartEdge` | findMany, findOne, create, update, delete | | `orgChartEdgeGrant` | findMany, findOne, create, update, delete | @@ -106,7 +110,6 @@ const db = createClient({ | `email` | findMany, findOne, create, update, delete | | `phoneNumber` | findMany, findOne, create, update, delete | | `cryptoAddress` | findMany, findOne, create, update, delete | -| `connectedAccount` | findMany, findOne, create, update, delete | | `appInvite` | findMany, findOne, create, update, delete | | `appClaimedInvite` | findMany, findOne, create, update, delete | | `orgInvite` | findMany, findOne, create, update, delete | @@ -119,10 +122,12 @@ const db = createClient({ | `migrateFile` | findMany, findOne, create, update, delete | | `appLimitDefault` | findMany, findOne, create, update, delete | | `orgLimitDefault` | findMany, findOne, create, update, delete | -| `membershipType` | findMany, findOne, create, update, delete | +| `devicesModule` | findMany, findOne, create, update, delete | +| `userConnectedAccount` | findMany, findOne, create, update, delete | | `appMembershipDefault` | findMany, findOne, create, update, delete | | `commit` | findMany, findOne, create, update, delete | | `rateLimitsModule` | findMany, findOne, create, update, delete | +| `membershipType` | findMany, findOne, create, update, delete | | `orgMembershipDefault` | findMany, findOne, create, update, delete | | `rlsModule` | findMany, findOne, create, update, delete | | `sqlAction` | findMany, findOne, create, update, delete | @@ -580,6 +585,49 @@ const updated = await db.field.update({ where: { id: '' }, data: { databas const deleted = await db.field.delete({ where: { id: '' } }).execute(); ``` +### `db.spatialRelation` + +CRUD operations for SpatialRelation records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `fieldId` | UUID | Yes | +| `refTableId` | UUID | Yes | +| `refFieldId` | UUID | Yes | +| `name` | String | Yes | +| `operator` | String | Yes | +| `paramName` | String | Yes | +| `category` | ObjectCategory | Yes | +| `module` | String | Yes | +| `scope` | Int | Yes | +| `tags` | String | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all spatialRelation records +const items = await db.spatialRelation.findMany({ select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.spatialRelation.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', module: '', scope: '', tags: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.spatialRelation.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.spatialRelation.delete({ where: { id: '' } }).execute(); +``` + ### `db.foreignKeyConstraint` CRUD operations for ForeignKeyConstraint records. @@ -1107,43 +1155,6 @@ const updated = await db.embeddingChunk.update({ where: { id: '' }, data: const deleted = await db.embeddingChunk.delete({ where: { id: '' } }).execute(); ``` -### `db.tableTemplateModule` - -CRUD operations for TableTemplateModule records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | UUID | No | -| `databaseId` | UUID | Yes | -| `schemaId` | UUID | Yes | -| `privateSchemaId` | UUID | Yes | -| `tableId` | UUID | Yes | -| `ownerTableId` | UUID | Yes | -| `tableName` | String | Yes | -| `nodeType` | String | Yes | -| `data` | JSON | Yes | - -**Operations:** - -```typescript -// List all tableTemplateModule records -const items = await db.tableTemplateModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true, nodeType: true, data: true } }).execute(); - -// Get one by id -const item = await db.tableTemplateModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true, nodeType: true, data: true } }).execute(); - -// Create -const created = await db.tableTemplateModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '', nodeType: '', data: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.tableTemplateModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.tableTemplateModule.delete({ where: { id: '' } }).execute(); -``` - ### `db.secureTableProvision` CRUD operations for SecureTableProvision records. @@ -1247,6 +1258,40 @@ const updated = await db.relationProvision.update({ where: { id: '' }, dat const deleted = await db.relationProvision.delete({ where: { id: '' } }).execute(); ``` +### `db.sessionSecretsModule` + +CRUD operations for SessionSecretsModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `tableName` | String | Yes | +| `sessionsTableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all sessionSecretsModule records +const items = await db.sessionSecretsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } }).execute(); + +// Get one by id +const item = await db.sessionSecretsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } }).execute(); + +// Create +const created = await db.sessionSecretsModule.create({ data: { databaseId: '', schemaId: '', tableId: '', tableName: '', sessionsTableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.sessionSecretsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.sessionSecretsModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.schemaGrant` CRUD operations for SchemaGrant records. @@ -2204,18 +2249,19 @@ CRUD operations for MembershipsModule records. | `entityIdsByMask` | String | Yes | | `entityIdsByPerm` | String | Yes | | `entityIdsFunction` | String | Yes | +| `memberProfilesTableId` | UUID | Yes | **Operations:** ```typescript // List all membershipsModule records -const items = await db.membershipsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } }).execute(); +const items = await db.membershipsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } }).execute(); // Get one by id -const item = await db.membershipsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } }).execute(); +const item = await db.membershipsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } }).execute(); // Create -const created = await db.membershipsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '' }, select: { id: true } }).execute(); +const created = await db.membershipsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', memberProfilesTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.membershipsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -2453,21 +2499,21 @@ CRUD operations for UserAuthModule records. | `checkPasswordFunction` | String | Yes | | `sendAccountDeletionEmailFunction` | String | Yes | | `deleteAccountFunction` | String | Yes | -| `signInOneTimeTokenFunction` | String | Yes | -| `oneTimeTokenFunction` | String | Yes | +| `signInCrossOriginFunction` | String | Yes | +| `requestCrossOriginTokenFunction` | String | Yes | | `extendTokenExpires` | String | Yes | **Operations:** ```typescript // List all userAuthModule records -const items = await db.userAuthModule.findMany({ select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } }).execute(); +const items = await db.userAuthModule.findMany({ select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } }).execute(); // Get one by id -const item = await db.userAuthModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } }).execute(); +const item = await db.userAuthModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } }).execute(); // Create -const created = await db.userAuthModule.create({ data: { databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInOneTimeTokenFunction: '', oneTimeTokenFunction: '', extendTokenExpires: '' }, select: { id: true } }).execute(); +const created = await db.userAuthModule.create({ data: { databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInCrossOriginFunction: '', requestCrossOriginTokenFunction: '', extendTokenExpires: '' }, select: { id: true } }).execute(); // Update const updated = await db.userAuthModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -2686,6 +2732,86 @@ const updated = await db.storageModule.update({ where: { id: '' }, data: { const deleted = await db.storageModule.delete({ where: { id: '' } }).execute(); ``` +### `db.entityTypeProvision` + +CRUD operations for EntityTypeProvision records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `name` | String | Yes | +| `prefix` | String | Yes | +| `description` | String | Yes | +| `parentEntity` | String | Yes | +| `tableName` | String | Yes | +| `isVisible` | Boolean | Yes | +| `hasLimits` | Boolean | Yes | +| `hasProfiles` | Boolean | Yes | +| `hasLevels` | Boolean | Yes | +| `skipEntityPolicies` | Boolean | Yes | +| `tableProvision` | JSON | Yes | +| `outMembershipType` | Int | Yes | +| `outEntityTableId` | UUID | Yes | +| `outEntityTableName` | String | Yes | +| `outInstalledModules` | String | Yes | + +**Operations:** + +```typescript +// List all entityTypeProvision records +const items = await db.entityTypeProvision.findMany({ select: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } }).execute(); + +// Get one by id +const item = await db.entityTypeProvision.findOne({ id: '', select: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } }).execute(); + +// Create +const created = await db.entityTypeProvision.create({ data: { databaseId: '', name: '', prefix: '', description: '', parentEntity: '', tableName: '', isVisible: '', hasLimits: '', hasProfiles: '', hasLevels: '', skipEntityPolicies: '', tableProvision: '', outMembershipType: '', outEntityTableId: '', outEntityTableName: '', outInstalledModules: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.entityTypeProvision.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.entityTypeProvision.delete({ where: { id: '' } }).execute(); +``` + +### `db.webauthnCredentialsModule` + +CRUD operations for WebauthnCredentialsModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `privateSchemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `ownerTableId` | UUID | Yes | +| `tableName` | String | Yes | + +**Operations:** + +```typescript +// List all webauthnCredentialsModule records +const items = await db.webauthnCredentialsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } }).execute(); + +// Get one by id +const item = await db.webauthnCredentialsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } }).execute(); + +// Create +const created = await db.webauthnCredentialsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.webauthnCredentialsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.webauthnCredentialsModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.databaseProvisionModule` CRUD operations for DatabaseProvisionModule records. @@ -2848,25 +2974,27 @@ CRUD operations for OrgMembership records. | `isBanned` | Boolean | Yes | | `isDisabled` | Boolean | Yes | | `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isAdmin` | Boolean | Yes | | `permissions` | BitString | Yes | | `granted` | BitString | Yes | | `actorId` | UUID | Yes | | `entityId` | UUID | Yes | +| `isReadOnly` | Boolean | Yes | | `profileId` | UUID | Yes | **Operations:** ```typescript // List all orgMembership records -const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Get one by id -const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Create -const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }, select: { id: true } }).execute(); // Update const updated = await db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); @@ -2977,6 +3105,45 @@ const updated = await db.orgOwnerGrant.update({ where: { id: '' }, data: { const deleted = await db.orgOwnerGrant.delete({ where: { id: '' } }).execute(); ``` +### `db.orgMemberProfile` + +CRUD operations for OrgMemberProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `membershipId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `actorId` | UUID | Yes | +| `displayName` | String | Yes | +| `email` | String | Yes | +| `title` | String | Yes | +| `bio` | String | Yes | +| `profilePicture` | ConstructiveInternalTypeImage | Yes | + +**Operations:** + +```typescript +// List all orgMemberProfile records +const items = await db.orgMemberProfile.findMany({ select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Get one by id +const item = await db.orgMemberProfile.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Create +const created = await db.orgMemberProfile.create({ data: { membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgMemberProfile.update({ where: { id: '' }, data: { membershipId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgMemberProfile.delete({ where: { id: '' } }).execute(); +``` + ### `db.orgGrant` CRUD operations for OrgGrant records. @@ -3393,42 +3560,6 @@ const updated = await db.cryptoAddress.update({ where: { id: '' }, data: { const deleted = await db.cryptoAddress.delete({ where: { id: '' } }).execute(); ``` -### `db.connectedAccount` - -CRUD operations for ConnectedAccount records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | UUID | No | -| `ownerId` | UUID | Yes | -| `service` | String | Yes | -| `identifier` | String | Yes | -| `details` | JSON | Yes | -| `isVerified` | Boolean | Yes | -| `createdAt` | Datetime | No | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all connectedAccount records -const items = await db.connectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.connectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Create -const created = await db.connectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.connectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.connectedAccount.delete({ where: { id: '' } }).execute(); -``` - ### `db.appInvite` CRUD operations for AppInvite records. @@ -3835,36 +3966,75 @@ const updated = await db.orgLimitDefault.update({ where: { id: '' }, data: const deleted = await db.orgLimitDefault.delete({ where: { id: '' } }).execute(); ``` -### `db.membershipType` +### `db.devicesModule` -CRUD operations for MembershipType records. +CRUD operations for DevicesModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `id` | Int | No | -| `name` | String | Yes | -| `description` | String | Yes | -| `prefix` | String | Yes | +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `userDevicesTableId` | UUID | Yes | +| `deviceSettingsTableId` | UUID | Yes | +| `userDevicesTable` | String | Yes | +| `deviceSettingsTable` | String | Yes | **Operations:** ```typescript -// List all membershipType records -const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true } }).execute(); +// List all devicesModule records +const items = await db.devicesModule.findMany({ select: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } }).execute(); // Get one by id -const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true } }).execute(); +const item = await db.devicesModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } }).execute(); // Create -const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '' }, select: { id: true } }).execute(); +const created = await db.devicesModule.create({ data: { databaseId: '', schemaId: '', userDevicesTableId: '', deviceSettingsTableId: '', userDevicesTable: '', deviceSettingsTable: '' }, select: { id: true } }).execute(); // Update -const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); +const updated = await db.devicesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); +const deleted = await db.devicesModule.delete({ where: { id: '' } }).execute(); +``` + +### `db.userConnectedAccount` + +CRUD operations for UserConnectedAccount records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `ownerId` | UUID | Yes | +| `service` | String | Yes | +| `identifier` | String | Yes | +| `details` | JSON | Yes | +| `isVerified` | Boolean | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all userConnectedAccount records +const items = await db.userConnectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.userConnectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.userConnectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userConnectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userConnectedAccount.delete({ where: { id: '' } }).execute(); ``` ### `db.appMembershipDefault` @@ -3976,6 +4146,40 @@ const updated = await db.rateLimitsModule.update({ where: { id: '' }, data const deleted = await db.rateLimitsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.membershipType` + +CRUD operations for MembershipType records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | Int | No | +| `name` | String | Yes | +| `description` | String | Yes | +| `prefix` | String | Yes | +| `parentMembershipType` | Int | Yes | +| `hasUsersTableEntry` | Boolean | Yes | + +**Operations:** + +```typescript +// List all membershipType records +const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Get one by id +const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Create +const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); +``` + ### `db.orgMembershipDefault` CRUD operations for OrgMembershipDefault records. @@ -4194,6 +4398,7 @@ CRUD operations for AppMembership records. | `isDisabled` | Boolean | Yes | | `isVerified` | Boolean | Yes | | `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isAdmin` | Boolean | Yes | | `permissions` | BitString | Yes | @@ -4205,13 +4410,13 @@ CRUD operations for AppMembership records. ```typescript // List all appMembership records -const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Get one by id -const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Create -const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); // Update const updated = await db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); @@ -4281,6 +4486,17 @@ currentUserId const result = await db.query.currentUserId().execute(); ``` +### `db.query.currentUserAgent` + +currentUserAgent + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.currentUserAgent().execute(); +``` + ### `db.query.currentIpAddress` currentIpAddress @@ -4292,15 +4508,19 @@ currentIpAddress const result = await db.query.currentIpAddress().execute(); ``` -### `db.query.currentUserAgent` +### `db.query.requireStepUp` -currentUserAgent +requireStepUp - **Type:** query -- **Arguments:** none +- **Arguments:** + + | Argument | Type | + |----------|------| + | `stepUpType` | String | ```typescript -const result = await db.query.currentUserAgent().execute(); +const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); ``` ### `db.query.appPermissionsGetPaddedMask` @@ -4366,6 +4586,23 @@ revParse const result = await db.query.revParse({ dbId: '', storeId: '', refname: '' }).execute(); ``` +### `db.query.resolveBlueprintField` + +Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `databaseId` | UUID | + | `tableId` | UUID | + | `fieldName` | String | + +```typescript +const result = await db.query.resolveBlueprintField({ databaseId: '', tableId: '', fieldName: '' }).execute(); +``` + ### `db.query.orgIsManagerOf` orgIsManagerOf @@ -4661,6 +4898,51 @@ rejectDatabaseTransfer const result = await db.mutation.rejectDatabaseTransfer({ input: { transferId: '' } }).execute(); ``` +### `db.mutation.disconnectAccount` + +disconnectAccount + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DisconnectAccountInput (required) | + +```typescript +const result = await db.mutation.disconnectAccount({ input: { accountId: '' } }).execute(); +``` + +### `db.mutation.revokeApiKey` + +revokeApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeApiKeyInput (required) | + +```typescript +const result = await db.mutation.revokeApiKey({ input: { keyId: '' } }).execute(); +``` + +### `db.mutation.revokeSession` + +revokeSession + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeSessionInput (required) | + +```typescript +const result = await db.mutation.revokeSession({ input: { sessionId: '' } }).execute(); +``` + ### `db.mutation.verifyPassword` verifyPassword @@ -4813,7 +5095,7 @@ const result = await db.mutation.initEmptyRepo({ input: { dbId: '', storeI ### `db.mutation.constructBlueprint` -Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. +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. - **Type:** mutation - **Arguments:** @@ -4826,6 +5108,21 @@ Executes a blueprint definition by delegating to provision_* procedures. Creates const result = await db.mutation.constructBlueprint({ input: { blueprintId: '', schemaId: '' } }).execute(); ``` +### `db.mutation.provisionNewUser` + +provisionNewUser + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionNewUserInput (required) | + +```typescript +const result = await db.mutation.provisionNewUser({ input: { email: '', password: '' } }).execute(); +``` + ### `db.mutation.resetPassword` resetPassword @@ -4871,6 +5168,36 @@ Creates a new blueprint by copying a template definition. Checks visibility: own const result = await db.mutation.copyTemplateToBlueprint({ input: { templateId: '', databaseId: '', ownerId: '', nameOverride: '', displayNameOverride: '' } }).execute(); ``` +### `db.mutation.createApiKey` + +createApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateApiKeyInput (required) | + +```typescript +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }).execute(); +``` + +### `db.mutation.provisionSpatialRelation` + +Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionSpatialRelationInput (required) | + +```typescript +const result = await db.mutation.provisionSpatialRelation({ input: '' }).execute(); +``` + ### `db.mutation.bootstrapUser` bootstrapUser @@ -5066,19 +5393,19 @@ applyRls const result = await db.mutation.applyRls({ input: '' }).execute(); ``` -### `db.mutation.signInOneTimeToken` +### `db.mutation.signInCrossOrigin` -signInOneTimeToken +signInCrossOrigin - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInOneTimeTokenInput (required) | + | `input` | SignInCrossOriginInput (required) | ```typescript -const result = await db.mutation.signInOneTimeToken({ input: { token: '', credentialKind: '' } }).execute(); +const result = await db.mutation.signInCrossOrigin({ input: { token: '', credentialKind: '' } }).execute(); ``` ### `db.mutation.createUserDatabase` @@ -5127,49 +5454,49 @@ extendTokenExpires const result = await db.mutation.extendTokenExpires({ input: { amount: '' } }).execute(); ``` -### `db.mutation.signIn` +### `db.mutation.signUp` -signIn +signUp - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInInput (required) | + | `input` | SignUpInput (required) | ```typescript -const result = await db.mutation.signIn({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.signUp({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); ``` -### `db.mutation.signUp` +### `db.mutation.requestCrossOriginToken` -signUp +requestCrossOriginToken - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignUpInput (required) | + | `input` | RequestCrossOriginTokenInput (required) | ```typescript -const result = await db.mutation.signUp({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.requestCrossOriginToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); ``` -### `db.mutation.oneTimeToken` +### `db.mutation.signIn` -oneTimeToken +signIn - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | OneTimeTokenInput (required) | + | `input` | SignInInput (required) | ```typescript -const result = await db.mutation.oneTimeToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +const result = await db.mutation.signIn({ input: '' }).execute(); ``` ### `db.mutation.provisionTable` diff --git a/sdk/constructive-cli/src/public/orm/index.ts b/sdk/constructive-cli/src/public/orm/index.ts index 7d317c0a2..88153d3cd 100644 --- a/sdk/constructive-cli/src/public/orm/index.ts +++ b/sdk/constructive-cli/src/public/orm/index.ts @@ -17,6 +17,7 @@ import { SchemaModel } from './models/schema'; import { TableModel } from './models/table'; import { CheckConstraintModel } from './models/checkConstraint'; import { FieldModel } from './models/field'; +import { SpatialRelationModel } from './models/spatialRelation'; import { ForeignKeyConstraintModel } from './models/foreignKeyConstraint'; import { FullTextSearchModel } from './models/fullTextSearch'; import { IndexModel } from './models/index'; @@ -30,9 +31,9 @@ import { ViewTableModel } from './models/viewTable'; import { ViewGrantModel } from './models/viewGrant'; import { ViewRuleModel } from './models/viewRule'; import { EmbeddingChunkModel } from './models/embeddingChunk'; -import { TableTemplateModuleModel } from './models/tableTemplateModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; import { RelationProvisionModel } from './models/relationProvision'; +import { SessionSecretsModuleModel } from './models/sessionSecretsModule'; import { SchemaGrantModel } from './models/schemaGrant'; import { DefaultPrivilegeModel } from './models/defaultPrivilege'; import { EnumModel } from './models/enum'; @@ -70,6 +71,8 @@ import { BlueprintModel } from './models/blueprint'; import { BlueprintTemplateModel } from './models/blueprintTemplate'; import { BlueprintConstructionModel } from './models/blueprintConstruction'; import { StorageModuleModel } from './models/storageModule'; +import { EntityTypeProvisionModel } from './models/entityTypeProvision'; +import { WebauthnCredentialsModuleModel } from './models/webauthnCredentialsModule'; import { DatabaseProvisionModuleModel } from './models/databaseProvisionModule'; import { AppAdminGrantModel } from './models/appAdminGrant'; import { AppOwnerGrantModel } from './models/appOwnerGrant'; @@ -78,6 +81,7 @@ import { OrgMembershipModel } from './models/orgMembership'; import { OrgMemberModel } from './models/orgMember'; import { OrgAdminGrantModel } from './models/orgAdminGrant'; import { OrgOwnerGrantModel } from './models/orgOwnerGrant'; +import { OrgMemberProfileModel } from './models/orgMemberProfile'; import { OrgGrantModel } from './models/orgGrant'; import { OrgChartEdgeModel } from './models/orgChartEdge'; import { OrgChartEdgeGrantModel } from './models/orgChartEdgeGrant'; @@ -90,7 +94,6 @@ import { AppLevelModel } from './models/appLevel'; import { EmailModel } from './models/email'; import { PhoneNumberModel } from './models/phoneNumber'; import { CryptoAddressModel } from './models/cryptoAddress'; -import { ConnectedAccountModel } from './models/connectedAccount'; import { AppInviteModel } from './models/appInvite'; import { AppClaimedInviteModel } from './models/appClaimedInvite'; import { OrgInviteModel } from './models/orgInvite'; @@ -103,10 +106,12 @@ import { RoleTypeModel } from './models/roleType'; import { MigrateFileModel } from './models/migrateFile'; import { AppLimitDefaultModel } from './models/appLimitDefault'; import { OrgLimitDefaultModel } from './models/orgLimitDefault'; -import { MembershipTypeModel } from './models/membershipType'; +import { DevicesModuleModel } from './models/devicesModule'; +import { UserConnectedAccountModel } from './models/userConnectedAccount'; import { AppMembershipDefaultModel } from './models/appMembershipDefault'; import { CommitModel } from './models/commit'; import { RateLimitsModuleModel } from './models/rateLimitsModule'; +import { MembershipTypeModel } from './models/membershipType'; import { OrgMembershipDefaultModel } from './models/orgMembershipDefault'; import { RlsModuleModel } from './models/rlsModule'; import { SqlActionModel } from './models/sqlAction'; @@ -162,6 +167,7 @@ export function createClient(config: OrmClientConfig) { table: new TableModel(client), checkConstraint: new CheckConstraintModel(client), field: new FieldModel(client), + spatialRelation: new SpatialRelationModel(client), foreignKeyConstraint: new ForeignKeyConstraintModel(client), fullTextSearch: new FullTextSearchModel(client), index: new IndexModel(client), @@ -175,9 +181,9 @@ export function createClient(config: OrmClientConfig) { viewGrant: new ViewGrantModel(client), viewRule: new ViewRuleModel(client), embeddingChunk: new EmbeddingChunkModel(client), - tableTemplateModule: new TableTemplateModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), relationProvision: new RelationProvisionModel(client), + sessionSecretsModule: new SessionSecretsModuleModel(client), schemaGrant: new SchemaGrantModel(client), defaultPrivilege: new DefaultPrivilegeModel(client), enum: new EnumModel(client), @@ -215,6 +221,8 @@ export function createClient(config: OrmClientConfig) { blueprintTemplate: new BlueprintTemplateModel(client), blueprintConstruction: new BlueprintConstructionModel(client), storageModule: new StorageModuleModel(client), + entityTypeProvision: new EntityTypeProvisionModel(client), + webauthnCredentialsModule: new WebauthnCredentialsModuleModel(client), databaseProvisionModule: new DatabaseProvisionModuleModel(client), appAdminGrant: new AppAdminGrantModel(client), appOwnerGrant: new AppOwnerGrantModel(client), @@ -223,6 +231,7 @@ export function createClient(config: OrmClientConfig) { orgMember: new OrgMemberModel(client), orgAdminGrant: new OrgAdminGrantModel(client), orgOwnerGrant: new OrgOwnerGrantModel(client), + orgMemberProfile: new OrgMemberProfileModel(client), orgGrant: new OrgGrantModel(client), orgChartEdge: new OrgChartEdgeModel(client), orgChartEdgeGrant: new OrgChartEdgeGrantModel(client), @@ -235,7 +244,6 @@ export function createClient(config: OrmClientConfig) { email: new EmailModel(client), phoneNumber: new PhoneNumberModel(client), cryptoAddress: new CryptoAddressModel(client), - connectedAccount: new ConnectedAccountModel(client), appInvite: new AppInviteModel(client), appClaimedInvite: new AppClaimedInviteModel(client), orgInvite: new OrgInviteModel(client), @@ -248,10 +256,12 @@ export function createClient(config: OrmClientConfig) { migrateFile: new MigrateFileModel(client), appLimitDefault: new AppLimitDefaultModel(client), orgLimitDefault: new OrgLimitDefaultModel(client), - membershipType: new MembershipTypeModel(client), + devicesModule: new DevicesModuleModel(client), + userConnectedAccount: new UserConnectedAccountModel(client), appMembershipDefault: new AppMembershipDefaultModel(client), commit: new CommitModel(client), rateLimitsModule: new RateLimitsModuleModel(client), + membershipType: new MembershipTypeModel(client), orgMembershipDefault: new OrgMembershipDefaultModel(client), rlsModule: new RlsModuleModel(client), sqlAction: new SqlActionModel(client), diff --git a/sdk/constructive-cli/src/public/orm/input-types.ts b/sdk/constructive-cli/src/public/orm/input-types.ts index 60b4df70c..32d62b5eb 100644 --- a/sdk/constructive-cli/src/public/orm/input-types.ts +++ b/sdk/constructive-cli/src/public/orm/input-types.ts @@ -392,6 +392,23 @@ export interface Field { createdAt?: string | null; updatedAt?: string | null; } +export interface SpatialRelation { + id: string; + databaseId?: string | null; + tableId?: string | null; + fieldId?: string | null; + refTableId?: string | null; + refFieldId?: string | null; + name?: string | null; + operator?: string | null; + paramName?: string | null; + category?: ObjectCategory | null; + module?: string | null; + scope?: number | null; + tags?: string[] | null; + createdAt?: string | null; + updatedAt?: string | null; +} export interface ForeignKeyConstraint { id: string; databaseId?: string | null; @@ -585,17 +602,6 @@ export interface EmbeddingChunk { createdAt?: string | null; updatedAt?: string | null; } -export interface TableTemplateModule { - id: string; - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - tableId?: string | null; - ownerTableId?: string | null; - tableName?: string | null; - nodeType?: string | null; - data?: Record | null; -} /** Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. */ export interface SecureTableProvision { /** Unique identifier for this provision row. */ @@ -785,6 +791,16 @@ export interface RelationProvision { /** Output column for RelationManyToMany: the UUID of the FK field on the junction table referencing the target table. Populated by the trigger. NULL for RelationBelongsTo/RelationHasOne. Callers should not set this directly. */ outTargetFieldId?: string | null; } +/** Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. */ +export interface SessionSecretsModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; + /** Resolved reference to sessions_module.sessions_table, used to FK session_secrets.session_id with ON DELETE CASCADE. */ + sessionsTableId?: string | null; +} export interface SchemaGrant { id: string; databaseId?: string | null; @@ -1149,6 +1165,7 @@ export interface MembershipsModule { entityIdsByMask?: string | null; entityIdsByPerm?: string | null; entityIdsFunction?: string | null; + memberProfilesTableId?: string | null; } export interface PermissionsModule { id: string; @@ -1242,8 +1259,8 @@ export interface UserAuthModule { checkPasswordFunction?: string | null; sendAccountDeletionEmailFunction?: string | null; deleteAccountFunction?: string | null; - signInOneTimeTokenFunction?: string | null; - oneTimeTokenFunction?: string | null; + signInCrossOriginFunction?: string | null; + requestCrossOriginTokenFunction?: string | null; extendTokenExpires?: string | null; } export interface UsersModule { @@ -1372,6 +1389,153 @@ export interface StorageModule { maxFilenameLength?: number | null; cacheTtlSeconds?: number | null; } +/** + * 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. + */ +export interface EntityTypeProvision { + /** Unique identifier for this provision row. */ + id: string; + /** The database to provision this entity type in. Required. */ + databaseId?: string | null; + /** + * Human-readable name for this membership type, e.g. 'Data Room Member', 'Team Channel Member'. Required. + * Stored in the membership_types registry table. + */ + name?: string | null; + /** + * SQL prefix used for table and module naming, e.g. 'data_room', 'team_channel'. Required. + * Drives entity table name (prefix || 's' by default), module labels (permissions_module:prefix), + * and membership table names (prefix_memberships, prefix_members, etc.). + * Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING. + */ + prefix?: string | null; + /** Description of this membership type. Stored in the membership_types registry table. Defaults to empty string. */ + description?: string | null; + /** + * Prefix of the parent entity type. The trigger resolves this to a membership_type integer + * by looking up memberships_module WHERE prefix = parent_entity. + * Defaults to 'org' (the organization-level type). For nested types, set to the parent's prefix + * (e.g. 'data_room' for a team_channel nested under data_room). + * The parent type must already be provisioned before this INSERT. + */ + parentEntity?: string | null; + /** + * Override the entity table name. When NULL (default), the table name is derived as prefix || 's' + * (e.g. prefix 'data_room' produces table 'data_rooms'). + * Set this when the pluralization rule doesn't apply (e.g. prefix 'staff' should produce 'staff' not 'staffs'). + */ + tableName?: string | null; + /** + * Whether members of the parent entity can see child entities. Defaults to true. + * When true: a SELECT policy allows parent members to list child entities (e.g. org members can see all data rooms). + * When false: only direct members of the entity itself can see it (private entity mode). + * Controls whether the parent_member SELECT policy is created on the entity table. + * Only meaningful on the defaults path — ignored (no-op) when table_provision is non-NULL or + * skip_entity_policies=true, since no default policies are being applied in those cases. + */ + isVisible?: boolean | null; + /** + * Whether to apply limits_module security for this type. Defaults to false. + * The limits_module table structure is always created (memberships_module requires it), + * but when false, no RLS policies are applied to the limits tables. + * Set to true if this entity type needs configurable resource limits per membership. + */ + hasLimits?: boolean | null; + /** + * Whether to provision profiles_module for this type. Defaults to false. + * Profiles provide named permission roles (e.g. 'Editor', 'Viewer') with pre-configured permission bitmasks. + * When true, creates profile tables and applies profiles security. + */ + hasProfiles?: boolean | null; + /** + * Whether to provision levels_module for this type. Defaults to false. + * Levels provide gamification/achievement tracking for members. + * When true, creates level steps, achievements, and level tables with security. + */ + hasLevels?: boolean | null; + /** + * Escape hatch: when true, apply zero RLS policies to the entity table. Defaults to false. + * Use this only when you want the entity table provisioned with zero policies (e.g. because you + * plan to insert secure_table_provision rows yourself later). In most cases, prefer leaving this + * false and either accepting the five defaults (table_provision=NULL) or overriding them via + * table_provision. + * Defaults (applied when table_provision IS NULL and skip_entity_policies=false): + * - SELECT (parent_member): parent entity members can see child entities (only when is_visible=true) + * - SELECT (self_member): direct members of the entity can see it + * - INSERT: create_entity permission on the parent entity + * - UPDATE: admin_entity permission on the entity itself + * - DELETE: owner of the entity can delete it + */ + skipEntityPolicies?: boolean | null; + /** + * Single jsonb object describing the full security setup to apply to the entity table. + * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * entries, so an entity table is configured the same way an ordinary blueprint table is. + * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by + * table_provision.policies[] (is_visible becomes a no-op on this path). + * Recognized keys (all optional): + * - use_rls (boolean, default true) + * - nodes (jsonb array of {"$type","data"} Data* module entries) + * - fields (jsonb array of field objects: name,type,is_required,default,min,max,regexp,index) + * - grant_privileges (jsonb array of [privilege, columns] tuples) + * - grant_roles (jsonb array of role names; defaults to ["authenticated"]) + * - policies (jsonb array of policy objects; each with $type, privileges, data, name, role, permissive) + * The trigger fans policies[] into N secure_table_provision rows against the newly created entity table, + * with table-level setup (nodes/fields/grants) attached to the first row. + * Example — override with two SELECT policies: + * table_provision := jsonb_build_object( + * 'policies', jsonb_build_array( + * jsonb_build_object( + * '$type', 'AuthzEntityMembership', + * 'privileges', jsonb_build_array('select'), + * 'data', jsonb_build_object('entity_field', 'id', 'membership_type', 3), + * 'name', 'self_member' + * ), + * jsonb_build_object( + * '$type', 'AuthzDirectOwner', + * 'privileges', jsonb_build_array('select', 'update'), + * 'data', jsonb_build_object('owner_field', 'owner_id') + * ) + * ) + * ) + */ + tableProvision?: Record | null; + /** + * Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning. + * This is the ID used in membership_types, memberships_module, and all module tables. + */ + outMembershipType?: number | null; + /** + * Output: the UUID of the created entity table. Populated by the trigger. + * Use this to reference the entity table in subsequent relation_provision or secure_table_provision rows. + */ + outEntityTableId?: string | null; + /** Output: the name of the created entity table (e.g. 'data_rooms'). Populated by the trigger. */ + outEntityTableName?: string | null; + /** + * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Populated by the trigger. Useful for verifying which modules were provisioned. + */ + outInstalledModules?: string[] | null; +} +/** Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. */ +export interface WebauthnCredentialsModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + /** Reserved for future SECURITY DEFINER helpers on webauthn_credentials; unused in Phase 11a. */ + privateSchemaId?: string | null; + tableId?: string | null; + ownerTableId?: string | null; + tableName?: string | null; +} /** Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. */ export interface DatabaseProvisionModule { id: string; @@ -1448,6 +1612,8 @@ export interface OrgMembership { isDisabled?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -1460,6 +1626,8 @@ export interface OrgMembership { actorId?: string | null; /** References the entity (org or group) this membership belongs to */ entityId?: string | null; + /** Whether this member has read-only access (blocks mutations when true) */ + isReadOnly?: boolean | null; profileId?: string | null; } /** Simplified view of active members in an entity, used for listing who belongs to an org or group */ @@ -1498,6 +1666,28 @@ export interface OrgOwnerGrant { createdAt?: string | null; updatedAt?: string | null; } +/** Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) */ +export interface OrgMemberProfile { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** References the membership this profile belongs to (1:1) */ + membershipId?: string | null; + /** References the entity this profile belongs to (used for RLS lookups) */ + entityId?: string | null; + /** References the user who owns this profile (for self-edit RLS) */ + actorId?: string | null; + /** Display name shown to other entity members */ + displayName?: string | null; + /** Email address visible to other entity members (auto-populated from verified primary email) */ + email?: string | null; + /** Job title or role description visible to other entity members */ + title?: string | null; + /** Short biography visible to other entity members */ + bio?: string | null; + /** Profile picture visible to other entity members */ + profilePicture?: ConstructiveInternalTypeImage | null; +} /** Records of individual permission grants and revocations for members via bitmask */ export interface OrgGrant { id: string; @@ -1659,21 +1849,6 @@ export interface CryptoAddress { createdAt?: string | null; updatedAt?: string | null; } -/** OAuth and social login connections linking external service accounts to users */ -export interface ConnectedAccount { - id: string; - ownerId?: string | null; - /** The service used, e.g. `twitter` or `github`. */ - service?: string | null; - /** A unique identifier for the user within the service */ - identifier?: string | null; - /** Additional profile details extracted from this login method */ - details?: Record | null; - /** Whether this connected account has been verified */ - isVerified?: boolean | null; - createdAt?: string | null; - updatedAt?: string | null; -} /** Invitation records sent to prospective members via email, with token-based redemption and expiration */ export interface AppInvite { id: string; @@ -1821,16 +1996,24 @@ export interface OrgLimitDefault { /** Default maximum usage allowed for this limit */ max?: number | null; } -/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ -export interface MembershipType { - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; - /** Human-readable name of the membership type */ - name?: string | null; - /** Description of what this membership type represents */ - description?: string | null; - /** Short prefix used to namespace tables and functions for this membership scope */ - prefix?: string | null; +export interface DevicesModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + userDevicesTableId?: string | null; + deviceSettingsTableId?: string | null; + userDevicesTable?: string | null; + deviceSettingsTable?: string | null; +} +export interface UserConnectedAccount { + id: string; + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; + createdAt?: string | null; + updatedAt?: string | null; } /** Default membership settings per entity, controlling initial approval and verification state for new members */ export interface AppMembershipDefault { @@ -1874,6 +2057,21 @@ export interface RateLimitsModule { ipRateLimitsTable?: string | null; rateLimitsTable?: string | null; } +/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ +export interface MembershipType { + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; + /** Human-readable name of the membership type */ + name?: string | null; + /** Description of what this membership type represents */ + description?: string | null; + /** Short prefix used to namespace tables and functions for this membership scope */ + prefix?: string | null; + /** Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) */ + parentMembershipType?: number | null; + /** When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs */ + hasUsersTableEntry?: boolean | null; +} /** Default membership settings per entity, controlling initial approval and verification state for new members */ export interface OrgMembershipDefault { id: string; @@ -1966,6 +2164,8 @@ export interface AppMembership { isVerified?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -2025,6 +2225,7 @@ export interface DatabaseRelations { rlsModule?: RlsModule | null; hierarchyModule?: HierarchyModule | null; rateLimitsModule?: RateLimitsModule | null; + devicesModule?: DevicesModule | null; schemas?: ConnectionResult; tables?: ConnectionResult; checkConstraints?: ConnectionResult; @@ -2045,6 +2246,7 @@ export interface DatabaseRelations { defaultPrivileges?: ConnectionResult; enums?: ConnectionResult; embeddingChunks?: ConnectionResult; + spatialRelations?: ConnectionResult; databaseTransfers?: ConnectionResult; apis?: ConnectionResult; apiModules?: ConnectionResult; @@ -2074,12 +2276,14 @@ export interface DatabaseRelations { sessionsModules?: ConnectionResult; userAuthModules?: ConnectionResult; usersModules?: ConnectionResult; - tableTemplateModules?: ConnectionResult; secureTableProvisions?: ConnectionResult; relationProvisions?: ConnectionResult; blueprints?: ConnectionResult; blueprintConstructions?: ConnectionResult; storageModules?: ConnectionResult; + entityTypeProvisions?: ConnectionResult; + sessionSecretsModules?: ConnectionResult; + webauthnCredentialsModules?: ConnectionResult; databaseProvisionModules?: ConnectionResult; } export interface SchemaRelations { @@ -2090,8 +2294,7 @@ export interface SchemaRelations { defaultPrivileges?: ConnectionResult; enums?: ConnectionResult; apiSchemas?: ConnectionResult; - tableTemplateModulesByPrivateSchemaId?: ConnectionResult; - tableTemplateModules?: ConnectionResult; + sessionSecretsModules?: ConnectionResult; } export interface TableRelations { database?: Database | null; @@ -2111,11 +2314,13 @@ export interface TableRelations { viewTables?: ConnectionResult; embeddingChunksByChunksTableId?: ConnectionResult; embeddingChunks?: ConnectionResult; - tableTemplateModulesByOwnerTableId?: ConnectionResult; - tableTemplateModules?: ConnectionResult; + spatialRelationsByRefTableId?: ConnectionResult; + spatialRelations?: ConnectionResult; secureTableProvisions?: ConnectionResult; relationProvisionsBySourceTableId?: ConnectionResult; relationProvisionsByTargetTableId?: ConnectionResult; + sessionSecretsModulesBySessionsTableId?: ConnectionResult; + sessionSecretsModules?: ConnectionResult; } export interface CheckConstraintRelations { database?: Database | null; @@ -2124,6 +2329,15 @@ export interface CheckConstraintRelations { export interface FieldRelations { database?: Database | null; table?: Table | null; + spatialRelations?: ConnectionResult; + spatialRelationsByRefFieldId?: ConnectionResult; +} +export interface SpatialRelationRelations { + database?: Database | null; + field?: Field | null; + refField?: Field | null; + refTable?: Table | null; + table?: Table | null; } export interface ForeignKeyConstraintRelations { database?: Database | null; @@ -2185,13 +2399,6 @@ export interface EmbeddingChunkRelations { parentFkField?: Field | null; table?: Table | null; } -export interface TableTemplateModuleRelations { - database?: Database | null; - ownerTable?: Table | null; - privateSchema?: Schema | null; - schema?: Schema | null; - table?: Table | null; -} export interface SecureTableProvisionRelations { database?: Database | null; schema?: Schema | null; @@ -2202,6 +2409,12 @@ export interface RelationProvisionRelations { sourceTable?: Table | null; targetTable?: Table | null; } +export interface SessionSecretsModuleRelations { + database?: Database | null; + schema?: Schema | null; + sessionsTable?: Table | null; + table?: Table | null; +} export interface SchemaGrantRelations { database?: Database | null; schema?: Schema | null; @@ -2441,6 +2654,16 @@ export interface StorageModuleRelations { schema?: Schema | null; uploadRequestsTable?: Table | null; } +export interface EntityTypeProvisionRelations { + database?: Database | null; +} +export interface WebauthnCredentialsModuleRelations { + database?: Database | null; + ownerTable?: Table | null; + privateSchema?: Schema | null; + schema?: Schema | null; + table?: Table | null; +} export interface DatabaseProvisionModuleRelations { database?: Database | null; } @@ -2459,6 +2682,7 @@ export interface AppGrantRelations { export interface OrgMembershipRelations { actor?: User | null; entity?: User | null; + orgMemberProfileByMembershipId?: OrgMemberProfile | null; } export interface OrgMemberRelations { actor?: User | null; @@ -2474,6 +2698,11 @@ export interface OrgOwnerGrantRelations { entity?: User | null; grantor?: User | null; } +export interface OrgMemberProfileRelations { + actor?: User | null; + entity?: User | null; + membership?: OrgMembership | null; +} export interface OrgGrantRelations { actor?: User | null; entity?: User | null; @@ -2518,9 +2747,6 @@ export interface PhoneNumberRelations { export interface CryptoAddressRelations { owner?: User | null; } -export interface ConnectedAccountRelations { - owner?: User | null; -} export interface AppInviteRelations { sender?: User | null; } @@ -2548,7 +2774,13 @@ export interface RoleTypeRelations {} export interface MigrateFileRelations {} export interface AppLimitDefaultRelations {} export interface OrgLimitDefaultRelations {} -export interface MembershipTypeRelations {} +export interface DevicesModuleRelations { + database?: Database | null; + deviceSettingsTableByDeviceSettingsTableId?: Table | null; + schema?: Schema | null; + userDevicesTableByUserDevicesTableId?: Table | null; +} +export interface UserConnectedAccountRelations {} export interface AppMembershipDefaultRelations {} export interface CommitRelations {} export interface RateLimitsModuleRelations { @@ -2558,6 +2790,7 @@ export interface RateLimitsModuleRelations { rateLimitsTableByRateLimitsTableId?: Table | null; schema?: Schema | null; } +export interface MembershipTypeRelations {} export interface OrgMembershipDefaultRelations { entity?: User | null; } @@ -2591,6 +2824,8 @@ export interface UserRelations { orgOwnerGrantsByActorId?: ConnectionResult; orgOwnerGrantsByEntityId?: ConnectionResult; orgOwnerGrantsByGrantorId?: ConnectionResult; + orgMemberProfilesByActorId?: ConnectionResult; + orgMemberProfilesByEntityId?: ConnectionResult; orgGrantsByActorId?: ConnectionResult; orgGrantsByEntityId?: ConnectionResult; orgGrantsByGrantorId?: ConnectionResult; @@ -2611,7 +2846,6 @@ export interface UserRelations { ownedEmails?: ConnectionResult; ownedPhoneNumbers?: ConnectionResult; ownedCryptoAddresses?: ConnectionResult; - ownedConnectedAccounts?: ConnectionResult; appInvitesBySenderId?: ConnectionResult; appClaimedInvitesByReceiverId?: ConnectionResult; appClaimedInvitesBySenderId?: ConnectionResult; @@ -2652,6 +2886,7 @@ export type SchemaWithRelations = Schema & SchemaRelations; export type TableWithRelations = Table & TableRelations; export type CheckConstraintWithRelations = CheckConstraint & CheckConstraintRelations; export type FieldWithRelations = Field & FieldRelations; +export type SpatialRelationWithRelations = SpatialRelation & SpatialRelationRelations; export type ForeignKeyConstraintWithRelations = ForeignKeyConstraint & ForeignKeyConstraintRelations; export type FullTextSearchWithRelations = FullTextSearch & FullTextSearchRelations; @@ -2667,10 +2902,11 @@ export type ViewTableWithRelations = ViewTable & ViewTableRelations; export type ViewGrantWithRelations = ViewGrant & ViewGrantRelations; export type ViewRuleWithRelations = ViewRule & ViewRuleRelations; export type EmbeddingChunkWithRelations = EmbeddingChunk & EmbeddingChunkRelations; -export type TableTemplateModuleWithRelations = TableTemplateModule & TableTemplateModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; export type RelationProvisionWithRelations = RelationProvision & RelationProvisionRelations; +export type SessionSecretsModuleWithRelations = SessionSecretsModule & + SessionSecretsModuleRelations; export type SchemaGrantWithRelations = SchemaGrant & SchemaGrantRelations; export type DefaultPrivilegeWithRelations = DefaultPrivilege & DefaultPrivilegeRelations; export type EnumWithRelations = Enum & EnumRelations; @@ -2714,6 +2950,9 @@ export type BlueprintTemplateWithRelations = BlueprintTemplate & BlueprintTempla export type BlueprintConstructionWithRelations = BlueprintConstruction & BlueprintConstructionRelations; export type StorageModuleWithRelations = StorageModule & StorageModuleRelations; +export type EntityTypeProvisionWithRelations = EntityTypeProvision & EntityTypeProvisionRelations; +export type WebauthnCredentialsModuleWithRelations = WebauthnCredentialsModule & + WebauthnCredentialsModuleRelations; export type DatabaseProvisionModuleWithRelations = DatabaseProvisionModule & DatabaseProvisionModuleRelations; export type AppAdminGrantWithRelations = AppAdminGrant & AppAdminGrantRelations; @@ -2723,6 +2962,7 @@ export type OrgMembershipWithRelations = OrgMembership & OrgMembershipRelations; export type OrgMemberWithRelations = OrgMember & OrgMemberRelations; export type OrgAdminGrantWithRelations = OrgAdminGrant & OrgAdminGrantRelations; export type OrgOwnerGrantWithRelations = OrgOwnerGrant & OrgOwnerGrantRelations; +export type OrgMemberProfileWithRelations = OrgMemberProfile & OrgMemberProfileRelations; export type OrgGrantWithRelations = OrgGrant & OrgGrantRelations; export type OrgChartEdgeWithRelations = OrgChartEdge & OrgChartEdgeRelations; export type OrgChartEdgeGrantWithRelations = OrgChartEdgeGrant & OrgChartEdgeGrantRelations; @@ -2736,7 +2976,6 @@ export type AppLevelWithRelations = AppLevel & AppLevelRelations; export type EmailWithRelations = Email & EmailRelations; export type PhoneNumberWithRelations = PhoneNumber & PhoneNumberRelations; export type CryptoAddressWithRelations = CryptoAddress & CryptoAddressRelations; -export type ConnectedAccountWithRelations = ConnectedAccount & ConnectedAccountRelations; export type AppInviteWithRelations = AppInvite & AppInviteRelations; export type AppClaimedInviteWithRelations = AppClaimedInvite & AppClaimedInviteRelations; export type OrgInviteWithRelations = OrgInvite & OrgInviteRelations; @@ -2750,11 +2989,14 @@ export type RoleTypeWithRelations = RoleType & RoleTypeRelations; export type MigrateFileWithRelations = MigrateFile & MigrateFileRelations; export type AppLimitDefaultWithRelations = AppLimitDefault & AppLimitDefaultRelations; export type OrgLimitDefaultWithRelations = OrgLimitDefault & OrgLimitDefaultRelations; -export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; +export type DevicesModuleWithRelations = DevicesModule & DevicesModuleRelations; +export type UserConnectedAccountWithRelations = UserConnectedAccount & + UserConnectedAccountRelations; export type AppMembershipDefaultWithRelations = AppMembershipDefault & AppMembershipDefaultRelations; export type CommitWithRelations = Commit & CommitRelations; export type RateLimitsModuleWithRelations = RateLimitsModule & RateLimitsModuleRelations; +export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type OrgMembershipDefaultWithRelations = OrgMembershipDefault & OrgMembershipDefaultRelations; export type RlsModuleWithRelations = RlsModule & RlsModuleRelations; @@ -2831,6 +3073,9 @@ export type DatabaseSelect = { rateLimitsModule?: { select: RateLimitsModuleSelect; }; + devicesModule?: { + select: DevicesModuleSelect; + }; schemas?: { select: SchemaSelect; first?: number; @@ -2951,6 +3196,12 @@ export type DatabaseSelect = { filter?: EmbeddingChunkFilter; orderBy?: EmbeddingChunkOrderBy[]; }; + spatialRelations?: { + select: SpatialRelationSelect; + first?: number; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; + }; databaseTransfers?: { select: DatabaseTransferSelect; first?: number; @@ -3125,12 +3376,6 @@ export type DatabaseSelect = { filter?: UsersModuleFilter; orderBy?: UsersModuleOrderBy[]; }; - tableTemplateModules?: { - select: TableTemplateModuleSelect; - first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; - }; secureTableProvisions?: { select: SecureTableProvisionSelect; first?: number; @@ -3161,6 +3406,24 @@ export type DatabaseSelect = { filter?: StorageModuleFilter; orderBy?: StorageModuleOrderBy[]; }; + entityTypeProvisions?: { + select: EntityTypeProvisionSelect; + first?: number; + filter?: EntityTypeProvisionFilter; + orderBy?: EntityTypeProvisionOrderBy[]; + }; + sessionSecretsModules?: { + select: SessionSecretsModuleSelect; + first?: number; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; + }; + webauthnCredentialsModules?: { + select: WebauthnCredentialsModuleSelect; + first?: number; + filter?: WebauthnCredentialsModuleFilter; + orderBy?: WebauthnCredentialsModuleOrderBy[]; + }; databaseProvisionModules?: { select: DatabaseProvisionModuleSelect; first?: number; @@ -3222,17 +3485,11 @@ export type SchemaSelect = { filter?: ApiSchemaFilter; orderBy?: ApiSchemaOrderBy[]; }; - tableTemplateModulesByPrivateSchemaId?: { - select: TableTemplateModuleSelect; - first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; - }; - tableTemplateModules?: { - select: TableTemplateModuleSelect; + sessionSecretsModules?: { + select: SessionSecretsModuleSelect; first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; }; }; export type TableSelect = { @@ -3348,17 +3605,17 @@ export type TableSelect = { filter?: EmbeddingChunkFilter; orderBy?: EmbeddingChunkOrderBy[]; }; - tableTemplateModulesByOwnerTableId?: { - select: TableTemplateModuleSelect; + spatialRelationsByRefTableId?: { + select: SpatialRelationSelect; first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; }; - tableTemplateModules?: { - select: TableTemplateModuleSelect; + spatialRelations?: { + select: SpatialRelationSelect; first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; }; secureTableProvisions?: { select: SecureTableProvisionSelect; @@ -3378,6 +3635,18 @@ export type TableSelect = { filter?: RelationProvisionFilter; orderBy?: RelationProvisionOrderBy[]; }; + sessionSecretsModulesBySessionsTableId?: { + select: SessionSecretsModuleSelect; + first?: number; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; + }; + sessionSecretsModules?: { + select: SessionSecretsModuleSelect; + first?: number; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; + }; }; export type CheckConstraintSelect = { id?: boolean; @@ -3432,6 +3701,50 @@ export type FieldSelect = { table?: { select: TableSelect; }; + spatialRelations?: { + select: SpatialRelationSelect; + first?: number; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; + }; + spatialRelationsByRefFieldId?: { + select: SpatialRelationSelect; + first?: number; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; + }; +}; +export type SpatialRelationSelect = { + id?: boolean; + databaseId?: boolean; + tableId?: boolean; + fieldId?: boolean; + refTableId?: boolean; + refFieldId?: boolean; + name?: boolean; + operator?: boolean; + paramName?: boolean; + category?: boolean; + module?: boolean; + scope?: boolean; + tags?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + database?: { + select: DatabaseSelect; + }; + field?: { + select: FieldSelect; + }; + refField?: { + select: FieldSelect; + }; + refTable?: { + select: TableSelect; + }; + table?: { + select: TableSelect; + }; }; export type ForeignKeyConstraintSelect = { id?: boolean; @@ -3733,32 +4046,6 @@ export type EmbeddingChunkSelect = { select: TableSelect; }; }; -export type TableTemplateModuleSelect = { - id?: boolean; - databaseId?: boolean; - schemaId?: boolean; - privateSchemaId?: boolean; - tableId?: boolean; - ownerTableId?: boolean; - tableName?: boolean; - nodeType?: boolean; - data?: boolean; - database?: { - select: DatabaseSelect; - }; - ownerTable?: { - select: TableSelect; - }; - privateSchema?: { - select: SchemaSelect; - }; - schema?: { - select: SchemaSelect; - }; - table?: { - select: TableSelect; - }; -}; export type SecureTableProvisionSelect = { id?: boolean; databaseId?: boolean; @@ -3828,6 +4115,26 @@ export type RelationProvisionSelect = { select: TableSelect; }; }; +export type SessionSecretsModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + tableId?: boolean; + tableName?: boolean; + sessionsTableId?: boolean; + database?: { + select: DatabaseSelect; + }; + schema?: { + select: SchemaSelect; + }; + sessionsTable?: { + select: TableSelect; + }; + table?: { + select: TableSelect; + }; +}; export type SchemaGrantSelect = { id?: boolean; databaseId?: boolean; @@ -4422,6 +4729,7 @@ export type MembershipsModuleSelect = { entityIdsByMask?: boolean; entityIdsByPerm?: boolean; entityIdsFunction?: boolean; + memberProfilesTableId?: boolean; actorTable?: { select: TableSelect; }; @@ -4656,8 +4964,8 @@ export type UserAuthModuleSelect = { checkPasswordFunction?: boolean; sendAccountDeletionEmailFunction?: boolean; deleteAccountFunction?: boolean; - signInOneTimeTokenFunction?: boolean; - oneTimeTokenFunction?: boolean; + signInCrossOriginFunction?: boolean; + requestCrossOriginTokenFunction?: boolean; extendTokenExpires?: boolean; database?: { select: DatabaseSelect; @@ -4830,6 +5138,52 @@ export type StorageModuleSelect = { select: TableSelect; }; }; +export type EntityTypeProvisionSelect = { + id?: boolean; + databaseId?: boolean; + name?: boolean; + prefix?: boolean; + description?: boolean; + parentEntity?: boolean; + tableName?: boolean; + isVisible?: boolean; + hasLimits?: boolean; + hasProfiles?: boolean; + hasLevels?: boolean; + skipEntityPolicies?: boolean; + tableProvision?: boolean; + outMembershipType?: boolean; + outEntityTableId?: boolean; + outEntityTableName?: boolean; + outInstalledModules?: boolean; + database?: { + select: DatabaseSelect; + }; +}; +export type WebauthnCredentialsModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + privateSchemaId?: boolean; + tableId?: boolean; + ownerTableId?: boolean; + tableName?: boolean; + database?: { + select: DatabaseSelect; + }; + ownerTable?: { + select: TableSelect; + }; + privateSchema?: { + select: SchemaSelect; + }; + schema?: { + select: SchemaSelect; + }; + table?: { + select: TableSelect; + }; +}; export type DatabaseProvisionModuleSelect = { id?: boolean; databaseName?: boolean; @@ -4902,12 +5256,14 @@ export type OrgMembershipSelect = { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; granted?: boolean; actorId?: boolean; entityId?: boolean; + isReadOnly?: boolean; profileId?: boolean; actor?: { select: UserSelect; @@ -4915,6 +5271,9 @@ export type OrgMembershipSelect = { entity?: { select: UserSelect; }; + orgMemberProfileByMembershipId?: { + select: OrgMemberProfileSelect; + }; }; export type OrgMemberSelect = { id?: boolean; @@ -4964,6 +5323,28 @@ export type OrgOwnerGrantSelect = { select: UserSelect; }; }; +export type OrgMemberProfileSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + membershipId?: boolean; + entityId?: boolean; + actorId?: boolean; + displayName?: boolean; + email?: boolean; + title?: boolean; + bio?: boolean; + profilePicture?: boolean; + actor?: { + select: UserSelect; + }; + entity?: { + select: UserSelect; + }; + membership?: { + select: OrgMembershipSelect; + }; +}; export type OrgGrantSelect = { id?: boolean; permissions?: boolean; @@ -5128,19 +5509,6 @@ export type CryptoAddressSelect = { select: UserSelect; }; }; -export type ConnectedAccountSelect = { - id?: boolean; - ownerId?: boolean; - service?: boolean; - identifier?: boolean; - details?: boolean; - isVerified?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - owner?: { - select: UserSelect; - }; -}; export type AppInviteSelect = { id?: boolean; email?: boolean; @@ -5265,11 +5633,36 @@ export type OrgLimitDefaultSelect = { name?: boolean; max?: boolean; }; -export type MembershipTypeSelect = { +export type DevicesModuleSelect = { id?: boolean; - name?: boolean; - description?: boolean; - prefix?: boolean; + databaseId?: boolean; + schemaId?: boolean; + userDevicesTableId?: boolean; + deviceSettingsTableId?: boolean; + userDevicesTable?: boolean; + deviceSettingsTable?: boolean; + database?: { + select: DatabaseSelect; + }; + deviceSettingsTableByDeviceSettingsTableId?: { + select: TableSelect; + }; + schema?: { + select: SchemaSelect; + }; + userDevicesTableByUserDevicesTableId?: { + select: TableSelect; + }; +}; +export type UserConnectedAccountSelect = { + id?: boolean; + ownerId?: boolean; + service?: boolean; + identifier?: boolean; + details?: boolean; + isVerified?: boolean; + createdAt?: boolean; + updatedAt?: boolean; }; export type AppMembershipDefaultSelect = { id?: boolean; @@ -5317,6 +5710,14 @@ export type RateLimitsModuleSelect = { select: SchemaSelect; }; }; +export type MembershipTypeSelect = { + id?: boolean; + name?: boolean; + description?: boolean; + prefix?: boolean; + parentMembershipType?: boolean; + hasUsersTableEntry?: boolean; +}; export type OrgMembershipDefaultSelect = { id?: boolean; createdAt?: boolean; @@ -5500,6 +5901,18 @@ export type UserSelect = { filter?: OrgOwnerGrantFilter; orderBy?: OrgOwnerGrantOrderBy[]; }; + orgMemberProfilesByActorId?: { + select: OrgMemberProfileSelect; + first?: number; + filter?: OrgMemberProfileFilter; + orderBy?: OrgMemberProfileOrderBy[]; + }; + orgMemberProfilesByEntityId?: { + select: OrgMemberProfileSelect; + first?: number; + filter?: OrgMemberProfileFilter; + orderBy?: OrgMemberProfileOrderBy[]; + }; orgGrantsByActorId?: { select: OrgGrantSelect; first?: number; @@ -5620,12 +6033,6 @@ export type UserSelect = { filter?: CryptoAddressFilter; orderBy?: CryptoAddressOrderBy[]; }; - ownedConnectedAccounts?: { - select: ConnectedAccountSelect; - first?: number; - filter?: ConnectedAccountFilter; - orderBy?: ConnectedAccountOrderBy[]; - }; appInvitesBySenderId?: { select: AppInviteSelect; first?: number; @@ -5713,6 +6120,7 @@ export type AppMembershipSelect = { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; @@ -5980,6 +6388,10 @@ export interface DatabaseFilter { embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: DatabaseToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `databaseTransfers` relation. */ databaseTransfers?: DatabaseToManyDatabaseTransferFilter; /** `databaseTransfers` exist. */ @@ -6104,10 +6516,6 @@ export interface DatabaseFilter { hierarchyModule?: HierarchyModuleFilter; /** A related `hierarchyModule` exists. */ hierarchyModuleExists?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: DatabaseToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: DatabaseToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -6128,10 +6536,26 @@ export interface DatabaseFilter { storageModules?: DatabaseToManyStorageModuleFilter; /** `storageModules` exist. */ storageModulesExist?: boolean; + /** Filter by the object’s `entityTypeProvisions` relation. */ + entityTypeProvisions?: DatabaseToManyEntityTypeProvisionFilter; + /** `entityTypeProvisions` exist. */ + entityTypeProvisionsExist?: boolean; /** Filter by the object’s `rateLimitsModule` relation. */ rateLimitsModule?: RateLimitsModuleFilter; /** A related `rateLimitsModule` exists. */ rateLimitsModuleExists?: boolean; + /** Filter by the object’s `devicesModule` relation. */ + devicesModule?: DevicesModuleFilter; + /** A related `devicesModule` exists. */ + devicesModuleExists?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: DatabaseToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; + /** Filter by the object’s `webauthnCredentialsModules` relation. */ + webauthnCredentialsModules?: DatabaseToManyWebauthnCredentialsModuleFilter; + /** `webauthnCredentialsModules` exist. */ + webauthnCredentialsModulesExist?: boolean; /** Filter by the object’s `databaseProvisionModules` relation. */ databaseProvisionModules?: DatabaseToManyDatabaseProvisionModuleFilter; /** `databaseProvisionModules` exist. */ @@ -6198,14 +6622,10 @@ export interface SchemaFilter { apiSchemas?: SchemaToManyApiSchemaFilter; /** `apiSchemas` exist. */ apiSchemasExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByPrivateSchemaId` relation. */ - tableTemplateModulesByPrivateSchemaId?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByPrivateSchemaId` exist. */ - tableTemplateModulesByPrivateSchemaIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: SchemaToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } export interface TableFilter { /** Filter by the object’s `id` field. */ @@ -6316,14 +6736,14 @@ export interface TableFilter { embeddingChunks?: TableToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByOwnerTableId` relation. */ - tableTemplateModulesByOwnerTableId?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByOwnerTableId` exist. */ - tableTemplateModulesByOwnerTableIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefTableId` relation. */ + spatialRelationsByRefTableId?: TableToManySpatialRelationFilter; + /** `spatialRelationsByRefTableId` exist. */ + spatialRelationsByRefTableIdExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: TableToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: TableToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -6336,6 +6756,14 @@ export interface TableFilter { relationProvisionsByTargetTableId?: TableToManyRelationProvisionFilter; /** `relationProvisionsByTargetTableId` exist. */ relationProvisionsByTargetTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModulesBySessionsTableId` relation. */ + sessionSecretsModulesBySessionsTableId?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModulesBySessionsTableId` exist. */ + sessionSecretsModulesBySessionsTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } export interface CheckConstraintFilter { /** Filter by the object’s `id` field. */ @@ -6436,6 +6864,62 @@ export interface FieldFilter { database?: DatabaseFilter; /** Filter by the object’s `table` relation. */ table?: TableFilter; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: FieldToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefFieldId` relation. */ + spatialRelationsByRefFieldId?: FieldToManySpatialRelationFilter; + /** `spatialRelationsByRefFieldId` exist. */ + spatialRelationsByRefFieldIdExist?: boolean; +} +export interface SpatialRelationFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `refTableId` field. */ + refTableId?: UUIDFilter; + /** Filter by the object’s `refFieldId` field. */ + refFieldId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `operator` field. */ + operator?: StringFilter; + /** Filter by the object’s `paramName` field. */ + paramName?: StringFilter; + /** Filter by the object’s `category` field. */ + category?: ObjectCategoryFilter; + /** Filter by the object’s `module` field. */ + module?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: IntFilter; + /** Filter by the object’s `tags` field. */ + tags?: StringListFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: SpatialRelationFilter[]; + /** Checks for any expressions in this list. */ + or?: SpatialRelationFilter[]; + /** Negates the expression. */ + not?: SpatialRelationFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `field` relation. */ + field?: FieldFilter; + /** Filter by the object’s `refField` relation. */ + refField?: FieldFilter; + /** Filter by the object’s `refTable` relation. */ + refTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; } export interface ForeignKeyConstraintFilter { /** Filter by the object’s `id` field. */ @@ -6949,42 +7433,6 @@ export interface EmbeddingChunkFilter { /** Filter by the object’s `table` relation. */ table?: TableFilter; } -export interface TableTemplateModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `ownerTableId` field. */ - ownerTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; - /** Filter by the object’s `nodeType` field. */ - nodeType?: StringFilter; - /** Filter by the object’s `data` field. */ - data?: JSONFilter; - /** Checks for all expressions in this list. */ - and?: TableTemplateModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: TableTemplateModuleFilter[]; - /** Negates the expression. */ - not?: TableTemplateModuleFilter; - /** Filter by the object’s `database` relation. */ - database?: DatabaseFilter; - /** Filter by the object’s `ownerTable` relation. */ - ownerTable?: TableFilter; - /** Filter by the object’s `privateSchema` relation. */ - privateSchema?: SchemaFilter; - /** Filter by the object’s `schema` relation. */ - schema?: SchemaFilter; - /** Filter by the object’s `table` relation. */ - table?: TableFilter; -} export interface SecureTableProvisionFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -7107,6 +7555,34 @@ export interface RelationProvisionFilter { /** Filter by the object’s `targetTable` relation. */ targetTable?: TableFilter; } +export interface SessionSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: SessionSecretsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: SessionSecretsModuleFilter[]; + /** Negates the expression. */ + not?: SessionSecretsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `sessionsTable` relation. */ + sessionsTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} export interface SchemaGrantFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -8010,6 +8486,8 @@ export interface MembershipsModuleFilter { entityIdsByPerm?: StringFilter; /** Filter by the object’s `entityIdsFunction` field. */ entityIdsFunction?: StringFilter; + /** Filter by the object’s `memberProfilesTableId` field. */ + memberProfilesTableId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: MembershipsModuleFilter[]; /** Checks for any expressions in this list. */ @@ -8322,10 +8800,10 @@ export interface UserAuthModuleFilter { sendAccountDeletionEmailFunction?: StringFilter; /** Filter by the object’s `deleteAccountFunction` field. */ deleteAccountFunction?: StringFilter; - /** Filter by the object’s `signInOneTimeTokenFunction` field. */ - signInOneTimeTokenFunction?: StringFilter; - /** Filter by the object’s `oneTimeTokenFunction` field. */ - oneTimeTokenFunction?: StringFilter; + /** Filter by the object’s `signInCrossOriginFunction` field. */ + signInCrossOriginFunction?: StringFilter; + /** Filter by the object’s `requestCrossOriginTokenFunction` field. */ + requestCrossOriginTokenFunction?: StringFilter; /** Filter by the object’s `extendTokenExpires` field. */ extendTokenExpires?: StringFilter; /** Checks for all expressions in this list. */ @@ -8581,6 +9059,82 @@ export interface StorageModuleFilter { /** Filter by the object’s `uploadRequestsTable` relation. */ uploadRequestsTable?: TableFilter; } +export interface EntityTypeProvisionFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `parentEntity` field. */ + parentEntity?: StringFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `isVisible` field. */ + isVisible?: BooleanFilter; + /** Filter by the object’s `hasLimits` field. */ + hasLimits?: BooleanFilter; + /** Filter by the object’s `hasProfiles` field. */ + hasProfiles?: BooleanFilter; + /** Filter by the object’s `hasLevels` field. */ + hasLevels?: BooleanFilter; + /** Filter by the object’s `skipEntityPolicies` field. */ + skipEntityPolicies?: BooleanFilter; + /** Filter by the object’s `tableProvision` field. */ + tableProvision?: JSONFilter; + /** Filter by the object’s `outMembershipType` field. */ + outMembershipType?: IntFilter; + /** Filter by the object’s `outEntityTableId` field. */ + outEntityTableId?: UUIDFilter; + /** Filter by the object’s `outEntityTableName` field. */ + outEntityTableName?: StringFilter; + /** Filter by the object’s `outInstalledModules` field. */ + outInstalledModules?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: EntityTypeProvisionFilter[]; + /** Checks for any expressions in this list. */ + or?: EntityTypeProvisionFilter[]; + /** Negates the expression. */ + not?: EntityTypeProvisionFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; +} +export interface WebauthnCredentialsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: WebauthnCredentialsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: WebauthnCredentialsModuleFilter[]; + /** Negates the expression. */ + not?: WebauthnCredentialsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `ownerTable` relation. */ + ownerTable?: TableFilter; + /** Filter by the object’s `privateSchema` relation. */ + privateSchema?: SchemaFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} export interface DatabaseProvisionModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -8720,6 +9274,8 @@ export interface OrgMembershipFilter { isDisabled?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -8732,6 +9288,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ @@ -8744,6 +9302,10 @@ export interface OrgMembershipFilter { actor?: UserFilter; /** Filter by the object’s `entity` relation. */ entity?: UserFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; } export interface OrgMemberFilter { /** Filter by the object’s `id` field. */ @@ -8825,6 +9387,42 @@ export interface OrgOwnerGrantFilter { /** A related `grantor` exists. */ grantorExists?: boolean; } +export interface OrgMemberProfileFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Filter by the object’s `actor` relation. */ + actor?: UserFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; +} export interface OrgGrantFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -9131,32 +9729,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} export interface AppInviteFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -9417,21 +9989,59 @@ export interface OrgLimitDefaultFilter { /** Negates the expression. */ not?: OrgLimitDefaultFilter; } -export interface MembershipTypeFilter { +export interface DevicesModuleFilter { /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `userDevicesTableId` field. */ + userDevicesTableId?: UUIDFilter; + /** Filter by the object’s `deviceSettingsTableId` field. */ + deviceSettingsTableId?: UUIDFilter; + /** Filter by the object’s `userDevicesTable` field. */ + userDevicesTable?: StringFilter; + /** Filter by the object’s `deviceSettingsTable` field. */ + deviceSettingsTable?: StringFilter; /** Checks for all expressions in this list. */ - and?: MembershipTypeFilter[]; + and?: DevicesModuleFilter[]; /** Checks for any expressions in this list. */ - or?: MembershipTypeFilter[]; + or?: DevicesModuleFilter[]; /** Negates the expression. */ - not?: MembershipTypeFilter; + not?: DevicesModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `deviceSettingsTableByDeviceSettingsTableId` relation. */ + deviceSettingsTableByDeviceSettingsTableId?: TableFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `userDevicesTableByUserDevicesTableId` relation. */ + userDevicesTableByUserDevicesTableId?: TableFilter; +} +export interface UserConnectedAccountFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `service` field. */ + service?: StringFilter; + /** Filter by the object’s `identifier` field. */ + identifier?: StringFilter; + /** Filter by the object’s `details` field. */ + details?: JSONFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: UserConnectedAccountFilter[]; + /** Checks for any expressions in this list. */ + or?: UserConnectedAccountFilter[]; + /** Negates the expression. */ + not?: UserConnectedAccountFilter; } export interface AppMembershipDefaultFilter { /** Filter by the object’s `id` field. */ @@ -9517,6 +10127,26 @@ export interface RateLimitsModuleFilter { /** Filter by the object’s `schema` relation. */ schema?: SchemaFilter; } +export interface MembershipTypeFilter { + /** Filter by the object’s `id` field. */ + id?: IntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `parentMembershipType` field. */ + parentMembershipType?: IntFilter; + /** Filter by the object’s `hasUsersTableEntry` field. */ + hasUsersTableEntry?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: MembershipTypeFilter[]; + /** Checks for any expressions in this list. */ + or?: MembershipTypeFilter[]; + /** Negates the expression. */ + not?: MembershipTypeFilter; +} export interface OrgMembershipDefaultFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -9720,6 +10350,14 @@ export interface UserFilter { orgOwnerGrantsByGrantorId?: UserToManyOrgOwnerGrantFilter; /** `orgOwnerGrantsByGrantorId` exist. */ orgOwnerGrantsByGrantorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByActorId` relation. */ + orgMemberProfilesByActorId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByActorId` exist. */ + orgMemberProfilesByActorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByEntityId` relation. */ + orgMemberProfilesByEntityId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByEntityId` exist. */ + orgMemberProfilesByEntityIdExist?: boolean; /** Filter by the object’s `orgGrantsByActorId` relation. */ orgGrantsByActorId?: UserToManyOrgGrantFilter; /** `orgGrantsByActorId` exist. */ @@ -9800,10 +10438,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `appInvitesBySenderId` relation. */ appInvitesBySenderId?: UserToManyAppInviteFilter; /** `appInvitesBySenderId` exist. */ @@ -9911,6 +10545,8 @@ export interface AppMembershipFilter { isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -10265,6 +10901,40 @@ export type FieldOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type SpatialRelationOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'FIELD_ID_ASC' + | 'FIELD_ID_DESC' + | 'REF_TABLE_ID_ASC' + | 'REF_TABLE_ID_DESC' + | 'REF_FIELD_ID_ASC' + | 'REF_FIELD_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'OPERATOR_ASC' + | 'OPERATOR_DESC' + | 'PARAM_NAME_ASC' + | 'PARAM_NAME_DESC' + | 'CATEGORY_ASC' + | 'CATEGORY_DESC' + | 'MODULE_ASC' + | 'MODULE_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'TAGS_ASC' + | 'TAGS_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type ForeignKeyConstraintOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -10643,28 +11313,6 @@ export type EmbeddingChunkOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type TableTemplateModuleOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'OWNER_TABLE_ID_ASC' - | 'OWNER_TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC' - | 'NODE_TYPE_ASC' - | 'NODE_TYPE_DESC' - | 'DATA_ASC' - | 'DATA_DESC'; export type SecureTableProvisionOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -10767,6 +11415,22 @@ export type RelationProvisionOrderBy = | 'OUT_SOURCE_FIELD_ID_DESC' | 'OUT_TARGET_FIELD_ID_ASC' | 'OUT_TARGET_FIELD_ID_DESC'; +export type SessionSecretsModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'SESSIONS_TABLE_ID_ASC' + | 'SESSIONS_TABLE_ID_DESC'; export type SchemaGrantOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -11368,7 +12032,9 @@ export type MembershipsModuleOrderBy = | 'ENTITY_IDS_BY_PERM_ASC' | 'ENTITY_IDS_BY_PERM_DESC' | 'ENTITY_IDS_FUNCTION_ASC' - | 'ENTITY_IDS_FUNCTION_DESC'; + | 'ENTITY_IDS_FUNCTION_DESC' + | 'MEMBER_PROFILES_TABLE_ID_ASC' + | 'MEMBER_PROFILES_TABLE_ID_DESC'; export type PermissionsModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -11555,10 +12221,10 @@ export type UserAuthModuleOrderBy = | 'SEND_ACCOUNT_DELETION_EMAIL_FUNCTION_DESC' | 'DELETE_ACCOUNT_FUNCTION_ASC' | 'DELETE_ACCOUNT_FUNCTION_DESC' - | 'SIGN_IN_ONE_TIME_TOKEN_FUNCTION_ASC' - | 'SIGN_IN_ONE_TIME_TOKEN_FUNCTION_DESC' - | 'ONE_TIME_TOKEN_FUNCTION_ASC' - | 'ONE_TIME_TOKEN_FUNCTION_DESC' + | 'SIGN_IN_CROSS_ORIGIN_FUNCTION_ASC' + | 'SIGN_IN_CROSS_ORIGIN_FUNCTION_DESC' + | 'REQUEST_CROSS_ORIGIN_TOKEN_FUNCTION_ASC' + | 'REQUEST_CROSS_ORIGIN_TOKEN_FUNCTION_DESC' | 'EXTEND_TOKEN_EXPIRES_ASC' | 'EXTEND_TOKEN_EXPIRES_DESC'; export type UsersModuleOrderBy = @@ -11721,6 +12387,62 @@ export type StorageModuleOrderBy = | 'MAX_FILENAME_LENGTH_DESC' | 'CACHE_TTL_SECONDS_ASC' | 'CACHE_TTL_SECONDS_DESC'; +export type EntityTypeProvisionOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PARENT_ENTITY_ASC' + | 'PARENT_ENTITY_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'IS_VISIBLE_ASC' + | 'IS_VISIBLE_DESC' + | 'HAS_LIMITS_ASC' + | 'HAS_LIMITS_DESC' + | 'HAS_PROFILES_ASC' + | 'HAS_PROFILES_DESC' + | 'HAS_LEVELS_ASC' + | 'HAS_LEVELS_DESC' + | 'SKIP_ENTITY_POLICIES_ASC' + | 'SKIP_ENTITY_POLICIES_DESC' + | 'TABLE_PROVISION_ASC' + | 'TABLE_PROVISION_DESC' + | 'OUT_MEMBERSHIP_TYPE_ASC' + | 'OUT_MEMBERSHIP_TYPE_DESC' + | 'OUT_ENTITY_TABLE_ID_ASC' + | 'OUT_ENTITY_TABLE_ID_DESC' + | 'OUT_ENTITY_TABLE_NAME_ASC' + | 'OUT_ENTITY_TABLE_NAME_DESC' + | 'OUT_INSTALLED_MODULES_ASC' + | 'OUT_INSTALLED_MODULES_DESC'; +export type WebauthnCredentialsModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; export type DatabaseProvisionModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -11825,6 +12547,8 @@ export type OrgMembershipOrderBy = | 'IS_DISABLED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -11837,6 +12561,8 @@ export type OrgMembershipOrderBy = | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' | 'PROFILE_ID_ASC' | 'PROFILE_ID_DESC'; export type OrgMemberOrderBy = @@ -11887,6 +12613,32 @@ export type OrgOwnerGrantOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgMemberProfileOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'BIO_ASC' + | 'BIO_DESC' + | 'PROFILE_PICTURE_ASC' + | 'PROFILE_PICTURE_DESC'; export type OrgGrantOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12095,26 +12847,6 @@ export type CryptoAddressOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ConnectedAccountOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SERVICE_ASC' - | 'SERVICE_DESC' - | 'IDENTIFIER_ASC' - | 'IDENTIFIER_DESC' - | 'DETAILS_ASC' - | 'DETAILS_DESC' - | 'IS_VERIFIED_ASC' - | 'IS_VERIFIED_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type AppInviteOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12301,18 +13033,42 @@ export type OrgLimitDefaultOrderBy = | 'NAME_DESC' | 'MAX_ASC' | 'MAX_DESC'; -export type MembershipTypeOrderBy = +export type DevicesModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'DESCRIPTION_ASC' - | 'DESCRIPTION_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC'; + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'USER_DEVICES_TABLE_ID_ASC' + | 'USER_DEVICES_TABLE_ID_DESC' + | 'DEVICE_SETTINGS_TABLE_ID_ASC' + | 'DEVICE_SETTINGS_TABLE_ID_DESC' + | 'USER_DEVICES_TABLE_ASC' + | 'USER_DEVICES_TABLE_DESC' + | 'DEVICE_SETTINGS_TABLE_ASC' + | 'DEVICE_SETTINGS_TABLE_DESC'; +export type UserConnectedAccountOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SERVICE_ASC' + | 'SERVICE_DESC' + | 'IDENTIFIER_ASC' + | 'IDENTIFIER_DESC' + | 'DETAILS_ASC' + | 'DETAILS_DESC' + | 'IS_VERIFIED_ASC' + | 'IS_VERIFIED_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type AppMembershipDefaultOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12375,6 +13131,22 @@ export type RateLimitsModuleOrderBy = | 'IP_RATE_LIMITS_TABLE_DESC' | 'RATE_LIMITS_TABLE_ASC' | 'RATE_LIMITS_TABLE_DESC'; +export type MembershipTypeOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PARENT_MEMBERSHIP_TYPE_ASC' + | 'PARENT_MEMBERSHIP_TYPE_DESC' + | 'HAS_USERS_TABLE_ENTRY_ASC' + | 'HAS_USERS_TABLE_ENTRY_DESC'; export type OrgMembershipDefaultOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12529,6 +13301,8 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -12954,6 +13728,46 @@ export interface DeleteFieldInput { clientMutationId?: string; id: string; } +export interface CreateSpatialRelationInput { + clientMutationId?: string; + spatialRelation: { + databaseId?: string; + tableId: string; + fieldId: string; + refTableId: string; + refFieldId: string; + name: string; + operator: string; + paramName?: string; + category?: ObjectCategory; + module?: string; + scope?: number; + tags?: string[]; + }; +} +export interface SpatialRelationPatch { + databaseId?: string | null; + tableId?: string | null; + fieldId?: string | null; + refTableId?: string | null; + refFieldId?: string | null; + name?: string | null; + operator?: string | null; + paramName?: string | null; + category?: ObjectCategory | null; + module?: string | null; + scope?: number | null; + tags?: string[] | null; +} +export interface UpdateSpatialRelationInput { + clientMutationId?: string; + id: string; + spatialRelationPatch: SpatialRelationPatch; +} +export interface DeleteSpatialRelationInput { + clientMutationId?: string; + id: string; +} export interface CreateForeignKeyConstraintInput { clientMutationId?: string; foreignKeyConstraint: { @@ -13426,38 +14240,6 @@ export interface DeleteEmbeddingChunkInput { clientMutationId?: string; id: string; } -export interface CreateTableTemplateModuleInput { - clientMutationId?: string; - tableTemplateModule: { - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - tableId?: string; - ownerTableId?: string; - tableName: string; - nodeType: string; - data?: Record; - }; -} -export interface TableTemplateModulePatch { - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - tableId?: string | null; - ownerTableId?: string | null; - tableName?: string | null; - nodeType?: string | null; - data?: Record | null; -} -export interface UpdateTableTemplateModuleInput { - clientMutationId?: string; - id: string; - tableTemplateModulePatch: TableTemplateModulePatch; -} -export interface DeleteTableTemplateModuleInput { - clientMutationId?: string; - id: string; -} export interface CreateSecureTableProvisionInput { clientMutationId?: string; secureTableProvision: { @@ -13571,12 +14353,38 @@ export interface RelationProvisionPatch { outSourceFieldId?: string | null; outTargetFieldId?: string | null; } -export interface UpdateRelationProvisionInput { +export interface UpdateRelationProvisionInput { + clientMutationId?: string; + id: string; + relationProvisionPatch: RelationProvisionPatch; +} +export interface DeleteRelationProvisionInput { + clientMutationId?: string; + id: string; +} +export interface CreateSessionSecretsModuleInput { + clientMutationId?: string; + sessionSecretsModule: { + databaseId: string; + schemaId?: string; + tableId?: string; + tableName?: string; + sessionsTableId?: string; + }; +} +export interface SessionSecretsModulePatch { + databaseId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; + sessionsTableId?: string | null; +} +export interface UpdateSessionSecretsModuleInput { clientMutationId?: string; id: string; - relationProvisionPatch: RelationProvisionPatch; + sessionSecretsModulePatch: SessionSecretsModulePatch; } -export interface DeleteRelationProvisionInput { +export interface DeleteSessionSecretsModuleInput { clientMutationId?: string; id: string; } @@ -14393,6 +15201,7 @@ export interface CreateMembershipsModuleInput { entityIdsByMask?: string; entityIdsByPerm?: string; entityIdsFunction?: string; + memberProfilesTableId?: string; }; } export interface MembershipsModulePatch { @@ -14426,6 +15235,7 @@ export interface MembershipsModulePatch { entityIdsByMask?: string | null; entityIdsByPerm?: string | null; entityIdsFunction?: string | null; + memberProfilesTableId?: string | null; } export interface UpdateMembershipsModuleInput { clientMutationId?: string; @@ -14647,8 +15457,8 @@ export interface CreateUserAuthModuleInput { checkPasswordFunction?: string; sendAccountDeletionEmailFunction?: string; deleteAccountFunction?: string; - signInOneTimeTokenFunction?: string; - oneTimeTokenFunction?: string; + signInCrossOriginFunction?: string; + requestCrossOriginTokenFunction?: string; extendTokenExpires?: string; }; } @@ -14675,8 +15485,8 @@ export interface UserAuthModulePatch { checkPasswordFunction?: string | null; sendAccountDeletionEmailFunction?: string | null; deleteAccountFunction?: string | null; - signInOneTimeTokenFunction?: string | null; - oneTimeTokenFunction?: string | null; + signInCrossOriginFunction?: string | null; + requestCrossOriginTokenFunction?: string | null; extendTokenExpires?: string | null; } export interface UpdateUserAuthModuleInput { @@ -14886,6 +15696,82 @@ export interface DeleteStorageModuleInput { clientMutationId?: string; id: string; } +export interface CreateEntityTypeProvisionInput { + clientMutationId?: string; + entityTypeProvision: { + databaseId: string; + name: string; + prefix: string; + description?: string; + parentEntity?: string; + tableName?: string; + isVisible?: boolean; + hasLimits?: boolean; + hasProfiles?: boolean; + hasLevels?: boolean; + skipEntityPolicies?: boolean; + tableProvision?: Record; + outMembershipType?: number; + outEntityTableId?: string; + outEntityTableName?: string; + outInstalledModules?: string[]; + }; +} +export interface EntityTypeProvisionPatch { + databaseId?: string | null; + name?: string | null; + prefix?: string | null; + description?: string | null; + parentEntity?: string | null; + tableName?: string | null; + isVisible?: boolean | null; + hasLimits?: boolean | null; + hasProfiles?: boolean | null; + hasLevels?: boolean | null; + skipEntityPolicies?: boolean | null; + tableProvision?: Record | null; + outMembershipType?: number | null; + outEntityTableId?: string | null; + outEntityTableName?: string | null; + outInstalledModules?: string[] | null; +} +export interface UpdateEntityTypeProvisionInput { + clientMutationId?: string; + id: string; + entityTypeProvisionPatch: EntityTypeProvisionPatch; +} +export interface DeleteEntityTypeProvisionInput { + clientMutationId?: string; + id: string; +} +export interface CreateWebauthnCredentialsModuleInput { + clientMutationId?: string; + webauthnCredentialsModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + tableId?: string; + ownerTableId?: string; + tableName?: string; + }; +} +export interface WebauthnCredentialsModulePatch { + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + tableId?: string | null; + ownerTableId?: string | null; + tableName?: string | null; +} +export interface UpdateWebauthnCredentialsModuleInput { + clientMutationId?: string; + id: string; + webauthnCredentialsModulePatch: WebauthnCredentialsModulePatch; +} +export interface DeleteWebauthnCredentialsModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateDatabaseProvisionModuleInput { clientMutationId?: string; databaseProvisionModule: { @@ -15001,12 +15887,14 @@ export interface CreateOrgMembershipInput { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; granted?: string; actorId: string; entityId: string; + isReadOnly?: boolean; profileId?: string; }; } @@ -15017,12 +15905,14 @@ export interface OrgMembershipPatch { isBanned?: boolean | null; isDisabled?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; granted?: string | null; actorId?: string | null; entityId?: string | null; + isReadOnly?: boolean | null; profileId?: string | null; } export interface UpdateOrgMembershipInput { @@ -15104,6 +15994,39 @@ export interface DeleteOrgOwnerGrantInput { clientMutationId?: string; id: string; } +export interface CreateOrgMemberProfileInput { + clientMutationId?: string; + orgMemberProfile: { + membershipId: string; + entityId: string; + actorId: string; + displayName?: string; + email?: string; + title?: string; + bio?: string; + profilePicture?: ConstructiveInternalTypeImage; + }; +} +export interface OrgMemberProfilePatch { + membershipId?: string | null; + entityId?: string | null; + actorId?: string | null; + displayName?: string | null; + email?: string | null; + title?: string | null; + bio?: string | null; + profilePicture?: ConstructiveInternalTypeImage | null; + profilePictureUpload?: File | null; +} +export interface UpdateOrgMemberProfileInput { + clientMutationId?: string; + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; +} +export interface DeleteOrgMemberProfileInput { + clientMutationId?: string; + id: string; +} export interface CreateOrgGrantInput { clientMutationId?: string; orgGrant: { @@ -15399,32 +16322,6 @@ export interface DeleteCryptoAddressInput { clientMutationId?: string; id: string; } -export interface CreateConnectedAccountInput { - clientMutationId?: string; - connectedAccount: { - ownerId?: string; - service: string; - identifier: string; - details: Record; - isVerified?: boolean; - }; -} -export interface ConnectedAccountPatch { - ownerId?: string | null; - service?: string | null; - identifier?: string | null; - details?: Record | null; - isVerified?: boolean | null; -} -export interface UpdateConnectedAccountInput { - clientMutationId?: string; - id: string; - connectedAccountPatch: ConnectedAccountPatch; -} -export interface DeleteConnectedAccountInput { - clientMutationId?: string; - id: string; -} export interface CreateAppInviteInput { clientMutationId?: string; appInvite: { @@ -15713,27 +16610,59 @@ export interface DeleteOrgLimitDefaultInput { clientMutationId?: string; id: string; } -export interface CreateMembershipTypeInput { +export interface CreateDevicesModuleInput { clientMutationId?: string; - membershipType: { - name: string; - description: string; - prefix: string; + devicesModule: { + databaseId: string; + schemaId?: string; + userDevicesTableId?: string; + deviceSettingsTableId?: string; + userDevicesTable?: string; + deviceSettingsTable?: string; }; } -export interface MembershipTypePatch { - name?: string | null; - description?: string | null; - prefix?: string | null; +export interface DevicesModulePatch { + databaseId?: string | null; + schemaId?: string | null; + userDevicesTableId?: string | null; + deviceSettingsTableId?: string | null; + userDevicesTable?: string | null; + deviceSettingsTable?: string | null; } -export interface UpdateMembershipTypeInput { +export interface UpdateDevicesModuleInput { clientMutationId?: string; - id: number; - membershipTypePatch: MembershipTypePatch; + id: string; + devicesModulePatch: DevicesModulePatch; } -export interface DeleteMembershipTypeInput { +export interface DeleteDevicesModuleInput { clientMutationId?: string; - id: number; + id: string; +} +export interface CreateUserConnectedAccountInput { + clientMutationId?: string; + userConnectedAccount: { + ownerId?: string; + service?: string; + identifier?: string; + details?: Record; + isVerified?: boolean; + }; +} +export interface UserConnectedAccountPatch { + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; +} +export interface UpdateUserConnectedAccountInput { + clientMutationId?: string; + id: string; + userConnectedAccountPatch: UserConnectedAccountPatch; +} +export interface DeleteUserConnectedAccountInput { + clientMutationId?: string; + id: string; } export interface CreateAppMembershipDefaultInput { clientMutationId?: string; @@ -15823,6 +16752,32 @@ export interface DeleteRateLimitsModuleInput { clientMutationId?: string; id: string; } +export interface CreateMembershipTypeInput { + clientMutationId?: string; + membershipType: { + name: string; + description: string; + prefix: string; + parentMembershipType?: number; + hasUsersTableEntry?: boolean; + }; +} +export interface MembershipTypePatch { + name?: string | null; + description?: string | null; + prefix?: string | null; + parentMembershipType?: number | null; + hasUsersTableEntry?: boolean | null; +} +export interface UpdateMembershipTypeInput { + clientMutationId?: string; + id: number; + membershipTypePatch: MembershipTypePatch; +} +export interface DeleteMembershipTypeInput { + clientMutationId?: string; + id: number; +} export interface CreateOrgMembershipDefaultInput { clientMutationId?: string; orgMembershipDefault: { @@ -15998,6 +16953,7 @@ export interface CreateAppMembershipInput { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; @@ -16014,6 +16970,7 @@ export interface AppMembershipPatch { isDisabled?: boolean | null; isVerified?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; @@ -16105,6 +17062,7 @@ export const connectionFieldsMap = { defaultPrivileges: 'DefaultPrivilege', enums: 'Enum', embeddingChunks: 'EmbeddingChunk', + spatialRelations: 'SpatialRelation', databaseTransfers: 'DatabaseTransfer', apis: 'Api', apiModules: 'ApiModule', @@ -16134,12 +17092,14 @@ export const connectionFieldsMap = { sessionsModules: 'SessionsModule', userAuthModules: 'UserAuthModule', usersModules: 'UsersModule', - tableTemplateModules: 'TableTemplateModule', secureTableProvisions: 'SecureTableProvision', relationProvisions: 'RelationProvision', blueprints: 'Blueprint', blueprintConstructions: 'BlueprintConstruction', storageModules: 'StorageModule', + entityTypeProvisions: 'EntityTypeProvision', + sessionSecretsModules: 'SessionSecretsModule', + webauthnCredentialsModules: 'WebauthnCredentialsModule', databaseProvisionModules: 'DatabaseProvisionModule', }, Schema: { @@ -16149,8 +17109,7 @@ export const connectionFieldsMap = { defaultPrivileges: 'DefaultPrivilege', enums: 'Enum', apiSchemas: 'ApiSchema', - tableTemplateModulesByPrivateSchemaId: 'TableTemplateModule', - tableTemplateModules: 'TableTemplateModule', + sessionSecretsModules: 'SessionSecretsModule', }, Table: { checkConstraints: 'CheckConstraint', @@ -16167,11 +17126,17 @@ export const connectionFieldsMap = { viewTables: 'ViewTable', embeddingChunksByChunksTableId: 'EmbeddingChunk', embeddingChunks: 'EmbeddingChunk', - tableTemplateModulesByOwnerTableId: 'TableTemplateModule', - tableTemplateModules: 'TableTemplateModule', + spatialRelationsByRefTableId: 'SpatialRelation', + spatialRelations: 'SpatialRelation', secureTableProvisions: 'SecureTableProvision', relationProvisionsBySourceTableId: 'RelationProvision', relationProvisionsByTargetTableId: 'RelationProvision', + sessionSecretsModulesBySessionsTableId: 'SessionSecretsModule', + sessionSecretsModules: 'SessionSecretsModule', + }, + Field: { + spatialRelations: 'SpatialRelation', + spatialRelationsByRefFieldId: 'SpatialRelation', }, View: { viewTables: 'ViewTable', @@ -16214,6 +17179,8 @@ export const connectionFieldsMap = { orgOwnerGrantsByActorId: 'OrgOwnerGrant', orgOwnerGrantsByEntityId: 'OrgOwnerGrant', orgOwnerGrantsByGrantorId: 'OrgOwnerGrant', + orgMemberProfilesByActorId: 'OrgMemberProfile', + orgMemberProfilesByEntityId: 'OrgMemberProfile', orgGrantsByActorId: 'OrgGrant', orgGrantsByEntityId: 'OrgGrant', orgGrantsByGrantorId: 'OrgGrant', @@ -16234,7 +17201,6 @@ export const connectionFieldsMap = { ownedEmails: 'Email', ownedPhoneNumbers: 'PhoneNumber', ownedCryptoAddresses: 'CryptoAddress', - ownedConnectedAccounts: 'ConnectedAccount', appInvitesBySenderId: 'AppInvite', appClaimedInvitesByReceiverId: 'AppClaimedInvite', appClaimedInvitesBySenderId: 'AppClaimedInvite', @@ -16266,6 +17232,18 @@ export interface RejectDatabaseTransferInput { clientMutationId?: string; transferId?: string; } +export interface DisconnectAccountInput { + clientMutationId?: string; + accountId: string; +} +export interface RevokeApiKeyInput { + clientMutationId?: string; + keyId: string; +} +export interface RevokeSessionInput { + clientMutationId?: string; + sessionId: string; +} export interface VerifyPasswordInput { clientMutationId?: string; password: string; @@ -16316,6 +17294,11 @@ export interface ConstructBlueprintInput { blueprintId?: string; schemaId?: string; } +export interface ProvisionNewUserInput { + clientMutationId?: string; + email?: string; + password?: string; +} export interface ResetPasswordInput { clientMutationId?: string; roleId?: string; @@ -16336,6 +17319,23 @@ export interface CopyTemplateToBlueprintInput { nameOverride?: string; displayNameOverride?: string; } +export interface CreateApiKeyInput { + clientMutationId?: string; + keyName: string; + accessLevel?: string; + mfaLevel?: string; +} +export interface ProvisionSpatialRelationInput { + clientMutationId?: string; + pDatabaseId?: string; + pSourceTableId?: string; + pSourceFieldId?: string; + pTargetTableId?: string; + pTargetFieldId?: string; + pName?: string; + pOperator?: string; + pParamName?: string; +} export interface BootstrapUserInput { clientMutationId?: string; targetDatabaseId?: string; @@ -16452,7 +17452,7 @@ export interface ApplyRlsInput { permissive?: boolean; name?: string; } -export interface SignInOneTimeTokenInput { +export interface SignInCrossOriginInput { clientMutationId?: string; token?: string; credentialKind?: string; @@ -16471,7 +17471,7 @@ export interface ExtendTokenExpiresInput { clientMutationId?: string; amount?: IntervalInput; } -export interface SignInInput { +export interface SignUpInput { clientMutationId?: string; email?: string; password?: string; @@ -16479,20 +17479,21 @@ export interface SignInInput { credentialKind?: string; csrfToken?: string; } -export interface SignUpInput { +export interface RequestCrossOriginTokenInput { clientMutationId?: string; email?: string; password?: string; + origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; - credentialKind?: string; - csrfToken?: string; } -export interface OneTimeTokenInput { +export interface SignInInput { clientMutationId?: string; email?: string; password?: string; - origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; + credentialKind?: string; + csrfToken?: string; + deviceToken?: string; } export interface ProvisionTableInput { clientMutationId?: string; @@ -16718,6 +17719,15 @@ export interface DatabaseToManyEmbeddingChunkFilter { /** Filters to entities where no related entity matches. */ none?: EmbeddingChunkFilter; } +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManySpatialRelationFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SpatialRelationFilter; + /** Filters to entities where every related entity matches. */ + every?: SpatialRelationFilter; + /** Filters to entities where no related entity matches. */ + none?: SpatialRelationFilter; +} /** A filter to be used against many `DatabaseTransfer` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManyDatabaseTransferFilter { /** Filters to entities where at least one related entity matches. */ @@ -16979,15 +17989,6 @@ export interface DatabaseToManyUsersModuleFilter { /** Filters to entities where no related entity matches. */ none?: UsersModuleFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface DatabaseToManyTableTemplateModuleFilter { - /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; - /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; - /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; -} /** A filter to be used against many `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManySecureTableProvisionFilter { /** Filters to entities where at least one related entity matches. */ @@ -17033,6 +18034,33 @@ export interface DatabaseToManyStorageModuleFilter { /** Filters to entities where no related entity matches. */ none?: StorageModuleFilter; } +/** A filter to be used against many `EntityTypeProvision` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManyEntityTypeProvisionFilter { + /** Filters to entities where at least one related entity matches. */ + some?: EntityTypeProvisionFilter; + /** Filters to entities where every related entity matches. */ + every?: EntityTypeProvisionFilter; + /** Filters to entities where no related entity matches. */ + none?: EntityTypeProvisionFilter; +} +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManySessionSecretsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SessionSecretsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: SessionSecretsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: SessionSecretsModuleFilter; +} +/** A filter to be used against many `WebauthnCredentialsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManyWebauthnCredentialsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: WebauthnCredentialsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: WebauthnCredentialsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: WebauthnCredentialsModuleFilter; +} /** A filter to be used against many `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManyDatabaseProvisionModuleFilter { /** Filters to entities where at least one related entity matches. */ @@ -17121,14 +18149,14 @@ export interface SchemaToManyApiSchemaFilter { /** Filters to entities where no related entity matches. */ none?: ApiSchemaFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface SchemaToManyTableTemplateModuleFilter { +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SchemaToManySessionSecretsModuleFilter { /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; + some?: SessionSecretsModuleFilter; /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; + every?: SessionSecretsModuleFilter; /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; + none?: SessionSecretsModuleFilter; } /** A filter to be used against many `CheckConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface TableToManyCheckConstraintFilter { @@ -17247,14 +18275,14 @@ export interface TableToManyEmbeddingChunkFilter { /** Filters to entities where no related entity matches. */ none?: EmbeddingChunkFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface TableToManyTableTemplateModuleFilter { +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface TableToManySpatialRelationFilter { /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; + some?: SpatialRelationFilter; /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; + every?: SpatialRelationFilter; /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; + none?: SpatialRelationFilter; } /** A filter to be used against many `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface TableToManySecureTableProvisionFilter { @@ -17274,6 +18302,24 @@ export interface TableToManyRelationProvisionFilter { /** Filters to entities where no related entity matches. */ none?: RelationProvisionFilter; } +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface TableToManySessionSecretsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SessionSecretsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: SessionSecretsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: SessionSecretsModuleFilter; +} +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface FieldToManySpatialRelationFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SpatialRelationFilter; + /** Filters to entities where every related entity matches. */ + every?: SpatialRelationFilter; + /** Filters to entities where no related entity matches. */ + none?: SpatialRelationFilter; +} /** A filter to be used against many `ViewTable` object types. All fields are combined with a logical ‘and.’ */ export interface ViewToManyViewTableFilter { /** Filters to entities where at least one related entity matches. */ @@ -18063,6 +19109,15 @@ export interface UserToManyOrgOwnerGrantFilter { /** Filters to entities where no related entity matches. */ none?: OrgOwnerGrantFilter; } +/** A filter to be used against many `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyOrgMemberProfileFilter { + /** Filters to entities where at least one related entity matches. */ + some?: OrgMemberProfileFilter; + /** Filters to entities where every related entity matches. */ + every?: OrgMemberProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgMemberProfileFilter; +} /** A filter to be used against many `OrgGrant` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyOrgGrantFilter { /** Filters to entities where at least one related entity matches. */ @@ -18171,15 +19226,6 @@ export interface UserToManyCryptoAddressFilter { /** Filters to entities where no related entity matches. */ none?: CryptoAddressFilter; } -/** A filter to be used against many `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface UserToManyConnectedAccountFilter { - /** Filters to entities where at least one related entity matches. */ - some?: ConnectedAccountFilter; - /** Filters to entities where every related entity matches. */ - every?: ConnectedAccountFilter; - /** Filters to entities where no related entity matches. */ - none?: ConnectedAccountFilter; -} /** A filter to be used against many `AppInvite` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyAppInviteFilter { /** Filters to entities where at least one related entity matches. */ @@ -18313,14 +19359,10 @@ export interface SchemaFilter { apiSchemas?: SchemaToManyApiSchemaFilter; /** `apiSchemas` exist. */ apiSchemasExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByPrivateSchemaId` relation. */ - tableTemplateModulesByPrivateSchemaId?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByPrivateSchemaId` exist. */ - tableTemplateModulesByPrivateSchemaIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: SchemaToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } /** A filter to be used against `Table` object types. All fields are combined with a logical ‘and.’ */ export interface TableFilter { @@ -18432,14 +19474,14 @@ export interface TableFilter { embeddingChunks?: TableToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByOwnerTableId` relation. */ - tableTemplateModulesByOwnerTableId?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByOwnerTableId` exist. */ - tableTemplateModulesByOwnerTableIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefTableId` relation. */ + spatialRelationsByRefTableId?: TableToManySpatialRelationFilter; + /** `spatialRelationsByRefTableId` exist. */ + spatialRelationsByRefTableIdExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: TableToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: TableToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -18452,6 +19494,14 @@ export interface TableFilter { relationProvisionsByTargetTableId?: TableToManyRelationProvisionFilter; /** `relationProvisionsByTargetTableId` exist. */ relationProvisionsByTargetTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModulesBySessionsTableId` relation. */ + sessionSecretsModulesBySessionsTableId?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModulesBySessionsTableId` exist. */ + sessionSecretsModulesBySessionsTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } /** A filter to be used against `CheckConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface CheckConstraintFilter { @@ -18554,6 +19604,14 @@ export interface FieldFilter { database?: DatabaseFilter; /** Filter by the object’s `table` relation. */ table?: TableFilter; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: FieldToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefFieldId` relation. */ + spatialRelationsByRefFieldId?: FieldToManySpatialRelationFilter; + /** `spatialRelationsByRefFieldId` exist. */ + spatialRelationsByRefFieldIdExist?: boolean; } /** A filter to be used against `ForeignKeyConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface ForeignKeyConstraintFilter { @@ -19151,23 +20209,72 @@ export interface EmbeddingChunkFilter { /** Checks for all expressions in this list. */ and?: EmbeddingChunkFilter[]; /** Checks for any expressions in this list. */ - or?: EmbeddingChunkFilter[]; + or?: EmbeddingChunkFilter[]; + /** Negates the expression. */ + not?: EmbeddingChunkFilter; + /** Filter by the object’s `chunksTable` relation. */ + chunksTable?: TableFilter; + /** A related `chunksTable` exists. */ + chunksTableExists?: boolean; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `embeddingField` relation. */ + embeddingField?: FieldFilter; + /** A related `embeddingField` exists. */ + embeddingFieldExists?: boolean; + /** Filter by the object’s `parentFkField` relation. */ + parentFkField?: FieldFilter; + /** A related `parentFkField` exists. */ + parentFkFieldExists?: boolean; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} +/** A filter to be used against `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface SpatialRelationFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `refTableId` field. */ + refTableId?: UUIDFilter; + /** Filter by the object’s `refFieldId` field. */ + refFieldId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `operator` field. */ + operator?: StringFilter; + /** Filter by the object’s `paramName` field. */ + paramName?: StringFilter; + /** Filter by the object’s `category` field. */ + category?: ObjectCategoryFilter; + /** Filter by the object’s `module` field. */ + module?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: IntFilter; + /** Filter by the object’s `tags` field. */ + tags?: StringListFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: SpatialRelationFilter[]; + /** Checks for any expressions in this list. */ + or?: SpatialRelationFilter[]; /** Negates the expression. */ - not?: EmbeddingChunkFilter; - /** Filter by the object’s `chunksTable` relation. */ - chunksTable?: TableFilter; - /** A related `chunksTable` exists. */ - chunksTableExists?: boolean; + not?: SpatialRelationFilter; /** Filter by the object’s `database` relation. */ database?: DatabaseFilter; - /** Filter by the object’s `embeddingField` relation. */ - embeddingField?: FieldFilter; - /** A related `embeddingField` exists. */ - embeddingFieldExists?: boolean; - /** Filter by the object’s `parentFkField` relation. */ - parentFkField?: FieldFilter; - /** A related `parentFkField` exists. */ - parentFkFieldExists?: boolean; + /** Filter by the object’s `field` relation. */ + field?: FieldFilter; + /** Filter by the object’s `refField` relation. */ + refField?: FieldFilter; + /** Filter by the object’s `refTable` relation. */ + refTable?: TableFilter; /** Filter by the object’s `table` relation. */ table?: TableFilter; } @@ -19988,6 +21095,8 @@ export interface MembershipsModuleFilter { entityIdsByPerm?: StringFilter; /** Filter by the object’s `entityIdsFunction` field. */ entityIdsFunction?: StringFilter; + /** Filter by the object’s `memberProfilesTableId` field. */ + memberProfilesTableId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: MembershipsModuleFilter[]; /** Checks for any expressions in this list. */ @@ -20306,10 +21415,10 @@ export interface UserAuthModuleFilter { sendAccountDeletionEmailFunction?: StringFilter; /** Filter by the object’s `deleteAccountFunction` field. */ deleteAccountFunction?: StringFilter; - /** Filter by the object’s `signInOneTimeTokenFunction` field. */ - signInOneTimeTokenFunction?: StringFilter; - /** Filter by the object’s `oneTimeTokenFunction` field. */ - oneTimeTokenFunction?: StringFilter; + /** Filter by the object’s `signInCrossOriginFunction` field. */ + signInCrossOriginFunction?: StringFilter; + /** Filter by the object’s `requestCrossOriginTokenFunction` field. */ + requestCrossOriginTokenFunction?: StringFilter; /** Filter by the object’s `extendTokenExpires` field. */ extendTokenExpires?: StringFilter; /** Checks for all expressions in this list. */ @@ -20366,43 +21475,6 @@ export interface UsersModuleFilter { /** Filter by the object’s `typeTable` relation. */ typeTable?: TableFilter; } -/** A filter to be used against `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface TableTemplateModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `ownerTableId` field. */ - ownerTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; - /** Filter by the object’s `nodeType` field. */ - nodeType?: StringFilter; - /** Filter by the object’s `data` field. */ - data?: JSONFilter; - /** Checks for all expressions in this list. */ - and?: TableTemplateModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: TableTemplateModuleFilter[]; - /** Negates the expression. */ - not?: TableTemplateModuleFilter; - /** Filter by the object’s `database` relation. */ - database?: DatabaseFilter; - /** Filter by the object’s `ownerTable` relation. */ - ownerTable?: TableFilter; - /** Filter by the object’s `privateSchema` relation. */ - privateSchema?: SchemaFilter; - /** Filter by the object’s `schema` relation. */ - schema?: SchemaFilter; - /** Filter by the object’s `table` relation. */ - table?: TableFilter; -} /** A filter to be used against `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface SecureTableProvisionFilter { /** Filter by the object’s `id` field. */ @@ -20670,6 +21742,113 @@ export interface StorageModuleFilter { /** Filter by the object’s `uploadRequestsTable` relation. */ uploadRequestsTable?: TableFilter; } +/** A filter to be used against `EntityTypeProvision` object types. All fields are combined with a logical ‘and.’ */ +export interface EntityTypeProvisionFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `parentEntity` field. */ + parentEntity?: StringFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `isVisible` field. */ + isVisible?: BooleanFilter; + /** Filter by the object’s `hasLimits` field. */ + hasLimits?: BooleanFilter; + /** Filter by the object’s `hasProfiles` field. */ + hasProfiles?: BooleanFilter; + /** Filter by the object’s `hasLevels` field. */ + hasLevels?: BooleanFilter; + /** Filter by the object’s `skipEntityPolicies` field. */ + skipEntityPolicies?: BooleanFilter; + /** Filter by the object’s `tableProvision` field. */ + tableProvision?: JSONFilter; + /** Filter by the object’s `outMembershipType` field. */ + outMembershipType?: IntFilter; + /** Filter by the object’s `outEntityTableId` field. */ + outEntityTableId?: UUIDFilter; + /** Filter by the object’s `outEntityTableName` field. */ + outEntityTableName?: StringFilter; + /** Filter by the object’s `outInstalledModules` field. */ + outInstalledModules?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: EntityTypeProvisionFilter[]; + /** Checks for any expressions in this list. */ + or?: EntityTypeProvisionFilter[]; + /** Negates the expression. */ + not?: EntityTypeProvisionFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; +} +/** A filter to be used against `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SessionSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: SessionSecretsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: SessionSecretsModuleFilter[]; + /** Negates the expression. */ + not?: SessionSecretsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `sessionsTable` relation. */ + sessionsTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} +/** A filter to be used against `WebauthnCredentialsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface WebauthnCredentialsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: WebauthnCredentialsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: WebauthnCredentialsModuleFilter[]; + /** Negates the expression. */ + not?: WebauthnCredentialsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `ownerTable` relation. */ + ownerTable?: TableFilter; + /** Filter by the object’s `privateSchema` relation. */ + privateSchema?: SchemaFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} /** A filter to be used against `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseProvisionModuleFilter { /** Filter by the object’s `id` field. */ @@ -20901,6 +22080,10 @@ export interface DatabaseFilter { embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: DatabaseToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `databaseTransfers` relation. */ databaseTransfers?: DatabaseToManyDatabaseTransferFilter; /** `databaseTransfers` exist. */ @@ -21025,10 +22208,6 @@ export interface DatabaseFilter { hierarchyModule?: HierarchyModuleFilter; /** A related `hierarchyModule` exists. */ hierarchyModuleExists?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: DatabaseToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: DatabaseToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -21049,10 +22228,26 @@ export interface DatabaseFilter { storageModules?: DatabaseToManyStorageModuleFilter; /** `storageModules` exist. */ storageModulesExist?: boolean; + /** Filter by the object’s `entityTypeProvisions` relation. */ + entityTypeProvisions?: DatabaseToManyEntityTypeProvisionFilter; + /** `entityTypeProvisions` exist. */ + entityTypeProvisionsExist?: boolean; /** Filter by the object’s `rateLimitsModule` relation. */ rateLimitsModule?: RateLimitsModuleFilter; /** A related `rateLimitsModule` exists. */ rateLimitsModuleExists?: boolean; + /** Filter by the object’s `devicesModule` relation. */ + devicesModule?: DevicesModuleFilter; + /** A related `devicesModule` exists. */ + devicesModuleExists?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: DatabaseToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; + /** Filter by the object’s `webauthnCredentialsModules` relation. */ + webauthnCredentialsModules?: DatabaseToManyWebauthnCredentialsModuleFilter; + /** `webauthnCredentialsModules` exist. */ + webauthnCredentialsModulesExist?: boolean; /** Filter by the object’s `databaseProvisionModules` relation. */ databaseProvisionModules?: DatabaseToManyDatabaseProvisionModuleFilter; /** `databaseProvisionModules` exist. */ @@ -21161,6 +22356,8 @@ export interface OrgMembershipFilter { isDisabled?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -21173,6 +22370,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ @@ -21185,6 +22384,10 @@ export interface OrgMembershipFilter { actor?: UserFilter; /** Filter by the object’s `entity` relation. */ entity?: UserFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; } /** A filter to be used against `OrgMember` object types. All fields are combined with a logical ‘and.’ */ export interface OrgMemberFilter { @@ -21269,6 +22472,43 @@ export interface OrgOwnerGrantFilter { /** A related `grantor` exists. */ grantorExists?: boolean; } +/** A filter to be used against `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMemberProfileFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Filter by the object’s `actor` relation. */ + actor?: UserFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; +} /** A filter to be used against `OrgGrant` object types. All fields are combined with a logical ‘and.’ */ export interface OrgGrantFilter { /** Filter by the object’s `id` field. */ @@ -21587,33 +22827,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -/** A filter to be used against `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} /** A filter to be used against `AppInvite` object types. All fields are combined with a logical ‘and.’ */ export interface AppInviteFilter { /** Filter by the object’s `id` field. */ @@ -22219,6 +23432,14 @@ export interface UserFilter { orgOwnerGrantsByGrantorId?: UserToManyOrgOwnerGrantFilter; /** `orgOwnerGrantsByGrantorId` exist. */ orgOwnerGrantsByGrantorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByActorId` relation. */ + orgMemberProfilesByActorId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByActorId` exist. */ + orgMemberProfilesByActorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByEntityId` relation. */ + orgMemberProfilesByEntityId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByEntityId` exist. */ + orgMemberProfilesByEntityIdExist?: boolean; /** Filter by the object’s `orgGrantsByActorId` relation. */ orgGrantsByActorId?: UserToManyOrgGrantFilter; /** `orgGrantsByActorId` exist. */ @@ -22299,10 +23520,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `appInvitesBySenderId` relation. */ appInvitesBySenderId?: UserToManyAppInviteFilter; /** `appInvitesBySenderId` exist. */ @@ -22500,6 +23717,37 @@ export interface RateLimitsModuleFilter { /** Filter by the object’s `schema` relation. */ schema?: SchemaFilter; } +/** A filter to be used against `DevicesModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DevicesModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `userDevicesTableId` field. */ + userDevicesTableId?: UUIDFilter; + /** Filter by the object’s `deviceSettingsTableId` field. */ + deviceSettingsTableId?: UUIDFilter; + /** Filter by the object’s `userDevicesTable` field. */ + userDevicesTable?: StringFilter; + /** Filter by the object’s `deviceSettingsTable` field. */ + deviceSettingsTable?: StringFilter; + /** Checks for all expressions in this list. */ + and?: DevicesModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: DevicesModuleFilter[]; + /** Negates the expression. */ + not?: DevicesModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `deviceSettingsTableByDeviceSettingsTableId` relation. */ + deviceSettingsTableByDeviceSettingsTableId?: TableFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `userDevicesTableByUserDevicesTableId` relation. */ + userDevicesTableByUserDevicesTableId?: TableFilter; +} /** A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ */ export interface BitStringFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -22614,6 +23862,8 @@ export interface AppMembershipFilter { isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -22779,6 +24029,30 @@ export type RejectDatabaseTransferPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface DisconnectAccountPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DisconnectAccountPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeSessionPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeSessionPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface VerifyPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -22861,6 +24135,14 @@ export type ConstructBlueprintPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface ProvisionNewUserPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type ProvisionNewUserPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ResetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -22885,6 +24167,24 @@ export type CopyTemplateToBlueprintPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface CreateApiKeyPayload { + clientMutationId?: string | null; + result?: CreateApiKeyRecord | null; +} +export type CreateApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: CreateApiKeyRecordSelect; + }; +}; +export interface ProvisionSpatialRelationPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type ProvisionSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface BootstrapUserPayload { clientMutationId?: string | null; result?: BootstrapUserRecord[] | null; @@ -22989,14 +24289,14 @@ export interface ApplyRlsPayload { export type ApplyRlsPayloadSelect = { clientMutationId?: boolean; }; -export interface SignInOneTimeTokenPayload { +export interface SignInCrossOriginPayload { clientMutationId?: string | null; - result?: SignInOneTimeTokenRecord | null; + result?: SignInCrossOriginRecord | null; } -export type SignInOneTimeTokenPayloadSelect = { +export type SignInCrossOriginPayloadSelect = { clientMutationId?: boolean; result?: { - select: SignInOneTimeTokenRecordSelect; + select: SignInCrossOriginRecordSelect; }; }; export interface CreateUserDatabasePayload { @@ -23017,16 +24317,6 @@ export type ExtendTokenExpiresPayloadSelect = { select: ExtendTokenExpiresRecordSelect; }; }; -export interface SignInPayload { - clientMutationId?: string | null; - result?: SignInRecord | null; -} -export type SignInPayloadSelect = { - clientMutationId?: boolean; - result?: { - select: SignInRecordSelect; - }; -}; export interface SignUpPayload { clientMutationId?: string | null; result?: SignUpRecord | null; @@ -23037,14 +24327,24 @@ export type SignUpPayloadSelect = { select: SignUpRecordSelect; }; }; -export interface OneTimeTokenPayload { +export interface RequestCrossOriginTokenPayload { clientMutationId?: string | null; result?: string | null; } -export type OneTimeTokenPayloadSelect = { +export type RequestCrossOriginTokenPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SignInPayload { + clientMutationId?: string | null; + result?: SignInRecord | null; +} +export type SignInPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: SignInRecordSelect; + }; +}; export interface ProvisionTablePayload { clientMutationId?: string | null; result?: ProvisionTableRecord[] | null; @@ -23528,6 +24828,51 @@ export type DeleteFieldPayloadSelect = { select: FieldEdgeSelect; }; }; +export interface CreateSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was created by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} +export type CreateSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + spatialRelation?: { + select: SpatialRelationSelect; + }; + spatialRelationEdge?: { + select: SpatialRelationEdgeSelect; + }; +}; +export interface UpdateSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was updated by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} +export type UpdateSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + spatialRelation?: { + select: SpatialRelationSelect; + }; + spatialRelationEdge?: { + select: SpatialRelationEdgeSelect; + }; +}; +export interface DeleteSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was deleted by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} +export type DeleteSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + spatialRelation?: { + select: SpatialRelationSelect; + }; + spatialRelationEdge?: { + select: SpatialRelationEdgeSelect; + }; +}; export interface CreateForeignKeyConstraintPayload { clientMutationId?: string | null; /** The `ForeignKeyConstraint` that was created by this mutation. */ @@ -24113,51 +25458,6 @@ export type DeleteEmbeddingChunkPayloadSelect = { select: EmbeddingChunkEdgeSelect; }; }; -export interface CreateTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was created by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} -export type CreateTableTemplateModulePayloadSelect = { - clientMutationId?: boolean; - tableTemplateModule?: { - select: TableTemplateModuleSelect; - }; - tableTemplateModuleEdge?: { - select: TableTemplateModuleEdgeSelect; - }; -}; -export interface UpdateTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was updated by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} -export type UpdateTableTemplateModulePayloadSelect = { - clientMutationId?: boolean; - tableTemplateModule?: { - select: TableTemplateModuleSelect; - }; - tableTemplateModuleEdge?: { - select: TableTemplateModuleEdgeSelect; - }; -}; -export interface DeleteTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was deleted by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} -export type DeleteTableTemplateModulePayloadSelect = { - clientMutationId?: boolean; - tableTemplateModule?: { - select: TableTemplateModuleSelect; - }; - tableTemplateModuleEdge?: { - select: TableTemplateModuleEdgeSelect; - }; -}; export interface CreateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was created by this mutation. */ @@ -24248,6 +25548,51 @@ export type DeleteRelationProvisionPayloadSelect = { select: RelationProvisionEdgeSelect; }; }; +export interface CreateSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was created by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} +export type CreateSessionSecretsModulePayloadSelect = { + clientMutationId?: boolean; + sessionSecretsModule?: { + select: SessionSecretsModuleSelect; + }; + sessionSecretsModuleEdge?: { + select: SessionSecretsModuleEdgeSelect; + }; +}; +export interface UpdateSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was updated by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} +export type UpdateSessionSecretsModulePayloadSelect = { + clientMutationId?: boolean; + sessionSecretsModule?: { + select: SessionSecretsModuleSelect; + }; + sessionSecretsModuleEdge?: { + select: SessionSecretsModuleEdgeSelect; + }; +}; +export interface DeleteSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was deleted by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} +export type DeleteSessionSecretsModulePayloadSelect = { + clientMutationId?: boolean; + sessionSecretsModule?: { + select: SessionSecretsModuleSelect; + }; + sessionSecretsModuleEdge?: { + select: SessionSecretsModuleEdgeSelect; + }; +}; export interface CreateSchemaGrantPayload { clientMutationId?: string | null; /** The `SchemaGrant` that was created by this mutation. */ @@ -25913,6 +27258,96 @@ export type DeleteStorageModulePayloadSelect = { select: StorageModuleEdgeSelect; }; }; +export interface CreateEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was created by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} +export type CreateEntityTypeProvisionPayloadSelect = { + clientMutationId?: boolean; + entityTypeProvision?: { + select: EntityTypeProvisionSelect; + }; + entityTypeProvisionEdge?: { + select: EntityTypeProvisionEdgeSelect; + }; +}; +export interface UpdateEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was updated by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} +export type UpdateEntityTypeProvisionPayloadSelect = { + clientMutationId?: boolean; + entityTypeProvision?: { + select: EntityTypeProvisionSelect; + }; + entityTypeProvisionEdge?: { + select: EntityTypeProvisionEdgeSelect; + }; +}; +export interface DeleteEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was deleted by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} +export type DeleteEntityTypeProvisionPayloadSelect = { + clientMutationId?: boolean; + entityTypeProvision?: { + select: EntityTypeProvisionSelect; + }; + entityTypeProvisionEdge?: { + select: EntityTypeProvisionEdgeSelect; + }; +}; +export interface CreateWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was created by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} +export type CreateWebauthnCredentialsModulePayloadSelect = { + clientMutationId?: boolean; + webauthnCredentialsModule?: { + select: WebauthnCredentialsModuleSelect; + }; + webauthnCredentialsModuleEdge?: { + select: WebauthnCredentialsModuleEdgeSelect; + }; +}; +export interface UpdateWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was updated by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} +export type UpdateWebauthnCredentialsModulePayloadSelect = { + clientMutationId?: boolean; + webauthnCredentialsModule?: { + select: WebauthnCredentialsModuleSelect; + }; + webauthnCredentialsModuleEdge?: { + select: WebauthnCredentialsModuleEdgeSelect; + }; +}; +export interface DeleteWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was deleted by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} +export type DeleteWebauthnCredentialsModulePayloadSelect = { + clientMutationId?: boolean; + webauthnCredentialsModule?: { + select: WebauthnCredentialsModuleSelect; + }; + webauthnCredentialsModuleEdge?: { + select: WebauthnCredentialsModuleEdgeSelect; + }; +}; export interface CreateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was created by this mutation. */ @@ -26273,6 +27708,51 @@ export type DeleteOrgOwnerGrantPayloadSelect = { select: OrgOwnerGrantEdgeSelect; }; }; +export interface CreateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was created by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type CreateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface UpdateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was updated by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type UpdateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface DeleteOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was deleted by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type DeleteOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; export interface CreateOrgGrantPayload { clientMutationId?: string | null; /** The `OrgGrant` that was created by this mutation. */ @@ -26813,51 +28293,6 @@ export type DeleteCryptoAddressPayloadSelect = { select: CryptoAddressEdgeSelect; }; }; -export interface CreateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was created by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type CreateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface UpdateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was updated by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type UpdateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface DeleteConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was deleted by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type DeleteConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; export interface CreateAppInvitePayload { clientMutationId?: string | null; /** The `AppInvite` that was created by this mutation. */ @@ -27364,49 +28799,60 @@ export type DeleteOrgLimitDefaultPayloadSelect = { select: OrgLimitDefaultEdgeSelect; }; }; -export interface CreateMembershipTypePayload { +export interface CreateDevicesModulePayload { clientMutationId?: string | null; - /** The `MembershipType` that was created by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; + /** The `DevicesModule` that was created by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; } -export type CreateMembershipTypePayloadSelect = { +export type CreateDevicesModulePayloadSelect = { clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; + devicesModule?: { + select: DevicesModuleSelect; }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; + devicesModuleEdge?: { + select: DevicesModuleEdgeSelect; }; }; -export interface UpdateMembershipTypePayload { +export interface UpdateDevicesModulePayload { clientMutationId?: string | null; - /** The `MembershipType` that was updated by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; + /** The `DevicesModule` that was updated by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; } -export type UpdateMembershipTypePayloadSelect = { +export type UpdateDevicesModulePayloadSelect = { clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; + devicesModule?: { + select: DevicesModuleSelect; }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; + devicesModuleEdge?: { + select: DevicesModuleEdgeSelect; }; }; -export interface DeleteMembershipTypePayload { +export interface DeleteDevicesModulePayload { clientMutationId?: string | null; - /** The `MembershipType` that was deleted by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; + /** The `DevicesModule` that was deleted by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; } -export type DeleteMembershipTypePayloadSelect = { +export type DeleteDevicesModulePayloadSelect = { clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; + devicesModule?: { + select: DevicesModuleSelect; }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; + devicesModuleEdge?: { + select: DevicesModuleEdgeSelect; + }; +}; +export interface CreateUserConnectedAccountPayload { + clientMutationId?: string | null; + /** The `UserConnectedAccount` that was created by this mutation. */ + userConnectedAccount?: UserConnectedAccount | null; +} +export type CreateUserConnectedAccountPayloadSelect = { + clientMutationId?: boolean; + userConnectedAccount?: { + select: UserConnectedAccountSelect; }; }; export interface CreateAppMembershipDefaultPayload { @@ -27544,6 +28990,51 @@ export type DeleteRateLimitsModulePayloadSelect = { select: RateLimitsModuleEdgeSelect; }; }; +export interface CreateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was created by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type CreateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface UpdateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was updated by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type UpdateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface DeleteMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was deleted by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type DeleteMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; export interface CreateOrgMembershipDefaultPayload { clientMutationId?: string | null; /** The `OrgMembershipDefault` that was created by this mutation. */ @@ -27856,6 +29347,14 @@ export type AppLevelRequirementEdgeSelect = { select: AppLevelRequirementSelect; }; }; +export interface CreateApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; +} +export type CreateApiKeyRecordSelect = { + apiKey?: boolean; + keyId?: boolean; +}; export interface BootstrapUserRecord { outUserId?: string | null; outEmail?: string | null; @@ -27896,7 +29395,7 @@ export type ProvisionRelationRecordSelect = { outSourceFieldId?: boolean; outTargetFieldId?: boolean; }; -export interface SignInOneTimeTokenRecord { +export interface SignInCrossOriginRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -27904,7 +29403,7 @@ export interface SignInOneTimeTokenRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInOneTimeTokenRecordSelect = { +export type SignInCrossOriginRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -27922,7 +29421,7 @@ export type ExtendTokenExpiresRecordSelect = { sessionId?: boolean; expiresAt?: boolean; }; -export interface SignInRecord { +export interface SignUpRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -27930,7 +29429,7 @@ export interface SignInRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInRecordSelect = { +export type SignUpRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -27938,21 +29437,25 @@ export type SignInRecordSelect = { isVerified?: boolean; totpEnabled?: boolean; }; -export interface SignUpRecord { +export interface SignInRecord { id?: string | null; userId?: string | null; accessToken?: string | null; accessTokenExpiresAt?: string | null; isVerified?: boolean | null; totpEnabled?: boolean | null; + mfaRequired?: boolean | null; + mfaChallengeToken?: string | null; } -export type SignUpRecordSelect = { +export type SignInRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; accessTokenExpiresAt?: boolean; isVerified?: boolean; totpEnabled?: boolean; + mfaRequired?: boolean; + mfaChallengeToken?: boolean; }; export interface ProvisionTableRecord { outTableId?: string | null; @@ -28022,6 +29525,18 @@ export type FieldEdgeSelect = { select: FieldSelect; }; }; +/** A `SpatialRelation` edge in the connection. */ +export interface SpatialRelationEdge { + cursor?: string | null; + /** The `SpatialRelation` at the end of the edge. */ + node?: SpatialRelation | null; +} +export type SpatialRelationEdgeSelect = { + cursor?: boolean; + node?: { + select: SpatialRelationSelect; + }; +}; /** A `ForeignKeyConstraint` edge in the connection. */ export interface ForeignKeyConstraintEdge { cursor?: string | null; @@ -28178,18 +29693,6 @@ export type EmbeddingChunkEdgeSelect = { select: EmbeddingChunkSelect; }; }; -/** A `TableTemplateModule` edge in the connection. */ -export interface TableTemplateModuleEdge { - cursor?: string | null; - /** The `TableTemplateModule` at the end of the edge. */ - node?: TableTemplateModule | null; -} -export type TableTemplateModuleEdgeSelect = { - cursor?: boolean; - node?: { - select: TableTemplateModuleSelect; - }; -}; /** A `SecureTableProvision` edge in the connection. */ export interface SecureTableProvisionEdge { cursor?: string | null; @@ -28214,6 +29717,18 @@ export type RelationProvisionEdgeSelect = { select: RelationProvisionSelect; }; }; +/** A `SessionSecretsModule` edge in the connection. */ +export interface SessionSecretsModuleEdge { + cursor?: string | null; + /** The `SessionSecretsModule` at the end of the edge. */ + node?: SessionSecretsModule | null; +} +export type SessionSecretsModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: SessionSecretsModuleSelect; + }; +}; /** A `SchemaGrant` edge in the connection. */ export interface SchemaGrantEdge { cursor?: string | null; @@ -28658,6 +30173,30 @@ export type StorageModuleEdgeSelect = { select: StorageModuleSelect; }; }; +/** A `EntityTypeProvision` edge in the connection. */ +export interface EntityTypeProvisionEdge { + cursor?: string | null; + /** The `EntityTypeProvision` at the end of the edge. */ + node?: EntityTypeProvision | null; +} +export type EntityTypeProvisionEdgeSelect = { + cursor?: boolean; + node?: { + select: EntityTypeProvisionSelect; + }; +}; +/** A `WebauthnCredentialsModule` edge in the connection. */ +export interface WebauthnCredentialsModuleEdge { + cursor?: string | null; + /** The `WebauthnCredentialsModule` at the end of the edge. */ + node?: WebauthnCredentialsModule | null; +} +export type WebauthnCredentialsModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: WebauthnCredentialsModuleSelect; + }; +}; /** A `DatabaseProvisionModule` edge in the connection. */ export interface DatabaseProvisionModuleEdge { cursor?: string | null; @@ -28754,6 +30293,18 @@ export type OrgOwnerGrantEdgeSelect = { select: OrgOwnerGrantSelect; }; }; +/** A `OrgMemberProfile` edge in the connection. */ +export interface OrgMemberProfileEdge { + cursor?: string | null; + /** The `OrgMemberProfile` at the end of the edge. */ + node?: OrgMemberProfile | null; +} +export type OrgMemberProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgMemberProfileSelect; + }; +}; /** A `OrgGrant` edge in the connection. */ export interface OrgGrantEdge { cursor?: string | null; @@ -28898,18 +30449,6 @@ export type CryptoAddressEdgeSelect = { select: CryptoAddressSelect; }; }; -/** A `ConnectedAccount` edge in the connection. */ -export interface ConnectedAccountEdge { - cursor?: string | null; - /** The `ConnectedAccount` at the end of the edge. */ - node?: ConnectedAccount | null; -} -export type ConnectedAccountEdgeSelect = { - cursor?: boolean; - node?: { - select: ConnectedAccountSelect; - }; -}; /** A `AppInvite` edge in the connection. */ export interface AppInviteEdge { cursor?: string | null; @@ -29042,16 +30581,16 @@ export type OrgLimitDefaultEdgeSelect = { select: OrgLimitDefaultSelect; }; }; -/** A `MembershipType` edge in the connection. */ -export interface MembershipTypeEdge { +/** A `DevicesModule` edge in the connection. */ +export interface DevicesModuleEdge { cursor?: string | null; - /** The `MembershipType` at the end of the edge. */ - node?: MembershipType | null; + /** The `DevicesModule` at the end of the edge. */ + node?: DevicesModule | null; } -export type MembershipTypeEdgeSelect = { +export type DevicesModuleEdgeSelect = { cursor?: boolean; node?: { - select: MembershipTypeSelect; + select: DevicesModuleSelect; }; }; /** A `AppMembershipDefault` edge in the connection. */ @@ -29090,6 +30629,18 @@ export type RateLimitsModuleEdgeSelect = { select: RateLimitsModuleSelect; }; }; +/** A `MembershipType` edge in the connection. */ +export interface MembershipTypeEdge { + cursor?: string | null; + /** The `MembershipType` at the end of the edge. */ + node?: MembershipType | null; +} +export type MembershipTypeEdgeSelect = { + cursor?: boolean; + node?: { + select: MembershipTypeSelect; + }; +}; /** A `OrgMembershipDefault` edge in the connection. */ export interface OrgMembershipDefaultEdge { cursor?: string | null; diff --git a/sdk/constructive-cli/src/public/orm/models/devicesModule.ts b/sdk/constructive-cli/src/public/orm/models/devicesModule.ts new file mode 100644 index 000000000..11386e4fe --- /dev/null +++ b/sdk/constructive-cli/src/public/orm/models/devicesModule.ts @@ -0,0 +1,237 @@ +/** + * DevicesModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + DevicesModule, + DevicesModuleWithRelations, + DevicesModuleSelect, + DevicesModuleFilter, + DevicesModuleOrderBy, + CreateDevicesModuleInput, + UpdateDevicesModuleInput, + DevicesModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class DevicesModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + devicesModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'DevicesModule', + 'devicesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'DevicesModuleFilter', + 'DevicesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DevicesModule', + fieldName: 'devicesModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + devicesModules: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'DevicesModule', + 'devicesModules', + args.select, + { + where: args?.where, + }, + 'DevicesModuleFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DevicesModule', + fieldName: 'devicesModules', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + devicesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'DevicesModule', + 'devicesModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'DevicesModuleFilter', + 'DevicesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DevicesModule', + fieldName: 'devicesModule', + document, + variables, + transform: (data: { + devicesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + devicesModule: data.devicesModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createDevicesModule: { + devicesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'DevicesModule', + 'createDevicesModule', + 'devicesModule', + args.select, + args.data, + 'CreateDevicesModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DevicesModule', + fieldName: 'createDevicesModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + DevicesModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateDevicesModule: { + devicesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'DevicesModule', + 'updateDevicesModule', + 'devicesModule', + args.select, + args.where.id, + args.data, + 'UpdateDevicesModuleInput', + 'id', + 'devicesModulePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DevicesModule', + fieldName: 'updateDevicesModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteDevicesModule: { + devicesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'DevicesModule', + 'deleteDevicesModule', + 'devicesModule', + { + id: args.where.id, + }, + 'DeleteDevicesModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DevicesModule', + fieldName: 'deleteDevicesModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/public/orm/models/tableTemplateModule.ts b/sdk/constructive-cli/src/public/orm/models/entityTypeProvision.ts similarity index 50% rename from sdk/constructive-cli/src/public/orm/models/tableTemplateModule.ts rename to sdk/constructive-cli/src/public/orm/models/entityTypeProvision.ts index c08032798..00ae9ebbc 100644 --- a/sdk/constructive-cli/src/public/orm/models/tableTemplateModule.ts +++ b/sdk/constructive-cli/src/public/orm/models/entityTypeProvision.ts @@ -1,5 +1,5 @@ /** - * TableTemplateModule model for ORM client + * EntityTypeProvision model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - TableTemplateModule, - TableTemplateModuleWithRelations, - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy, - CreateTableTemplateModuleInput, - UpdateTableTemplateModuleInput, - TableTemplateModulePatch, + EntityTypeProvision, + EntityTypeProvisionWithRelations, + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy, + CreateEntityTypeProvisionInput, + UpdateEntityTypeProvisionInput, + EntityTypeProvisionPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class TableTemplateModuleModel { +export class EntityTypeProvisionModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - tableTemplateModules: ConnectionResult>; + entityTypeProvisions: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'TableTemplateModule', - 'tableTemplateModules', + 'EntityTypeProvision', + 'entityTypeProvisions', args.select, { where: args?.where, @@ -56,58 +56,58 @@ export class TableTemplateModuleModel { before: args?.before, offset: args?.offset, }, - 'TableTemplateModuleFilter', - 'TableTemplateModuleOrderBy', + 'EntityTypeProvisionFilter', + 'EntityTypeProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'TableTemplateModule', - fieldName: 'tableTemplateModules', + operationName: 'EntityTypeProvision', + fieldName: 'entityTypeProvisions', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - tableTemplateModules: { - nodes: InferSelectResult[]; + entityTypeProvisions: { + nodes: InferSelectResult[]; }; }> { const { document, variables } = buildFindFirstDocument( - 'TableTemplateModule', - 'tableTemplateModules', + 'EntityTypeProvision', + 'entityTypeProvisions', args.select, { where: args?.where, }, - 'TableTemplateModuleFilter', + 'EntityTypeProvisionFilter', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'TableTemplateModule', - fieldName: 'tableTemplateModules', + operationName: 'EntityTypeProvision', + fieldName: 'entityTypeProvisions', document, variables, }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - tableTemplateModule: InferSelectResult | null; + entityTypeProvision: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'TableTemplateModule', - 'tableTemplateModules', + 'EntityTypeProvision', + 'entityTypeProvisions', args.select, { where: { @@ -117,90 +117,90 @@ export class TableTemplateModuleModel { }, first: 1, }, - 'TableTemplateModuleFilter', - 'TableTemplateModuleOrderBy', + 'EntityTypeProvisionFilter', + 'EntityTypeProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'TableTemplateModule', - fieldName: 'tableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'entityTypeProvision', document, variables, transform: (data: { - tableTemplateModules?: { - nodes?: InferSelectResult[]; + entityTypeProvisions?: { + nodes?: InferSelectResult[]; }; }) => ({ - tableTemplateModule: data.tableTemplateModules?.nodes?.[0] ?? null, + entityTypeProvision: data.entityTypeProvisions?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createTableTemplateModule: { - tableTemplateModule: InferSelectResult; + createEntityTypeProvision: { + entityTypeProvision: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'TableTemplateModule', - 'createTableTemplateModule', - 'tableTemplateModule', + 'EntityTypeProvision', + 'createEntityTypeProvision', + 'entityTypeProvision', args.select, args.data, - 'CreateTableTemplateModuleInput', + 'CreateEntityTypeProvisionInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'TableTemplateModule', - fieldName: 'createTableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'createEntityTypeProvision', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - TableTemplateModulePatch + EntityTypeProvisionPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateTableTemplateModule: { - tableTemplateModule: InferSelectResult; + updateEntityTypeProvision: { + entityTypeProvision: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'TableTemplateModule', - 'updateTableTemplateModule', - 'tableTemplateModule', + 'EntityTypeProvision', + 'updateEntityTypeProvision', + 'entityTypeProvision', args.select, args.where.id, args.data, - 'UpdateTableTemplateModuleInput', + 'UpdateEntityTypeProvisionInput', 'id', - 'tableTemplateModulePatch', + 'entityTypeProvisionPatch', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'TableTemplateModule', - fieldName: 'updateTableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'updateEntityTypeProvision', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -208,28 +208,28 @@ export class TableTemplateModuleModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteTableTemplateModule: { - tableTemplateModule: InferSelectResult; + deleteEntityTypeProvision: { + entityTypeProvision: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'TableTemplateModule', - 'deleteTableTemplateModule', - 'tableTemplateModule', + 'EntityTypeProvision', + 'deleteEntityTypeProvision', + 'entityTypeProvision', { id: args.where.id, }, - 'DeleteTableTemplateModuleInput', + 'DeleteEntityTypeProvisionInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'TableTemplateModule', - fieldName: 'deleteTableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'deleteEntityTypeProvision', document, variables, }); diff --git a/sdk/constructive-cli/src/public/orm/models/index.ts b/sdk/constructive-cli/src/public/orm/models/index.ts index 0eacaeee7..3a057bb2f 100644 --- a/sdk/constructive-cli/src/public/orm/models/index.ts +++ b/sdk/constructive-cli/src/public/orm/models/index.ts @@ -15,6 +15,7 @@ export { SchemaModel } from './schema'; export { TableModel } from './table'; export { CheckConstraintModel } from './checkConstraint'; export { FieldModel } from './field'; +export { SpatialRelationModel } from './spatialRelation'; export { ForeignKeyConstraintModel } from './foreignKeyConstraint'; export { FullTextSearchModel } from './fullTextSearch'; export { IndexModel } from './indexModel'; @@ -28,9 +29,9 @@ export { ViewTableModel } from './viewTable'; export { ViewGrantModel } from './viewGrant'; export { ViewRuleModel } from './viewRule'; export { EmbeddingChunkModel } from './embeddingChunk'; -export { TableTemplateModuleModel } from './tableTemplateModule'; export { SecureTableProvisionModel } from './secureTableProvision'; export { RelationProvisionModel } from './relationProvision'; +export { SessionSecretsModuleModel } from './sessionSecretsModule'; export { SchemaGrantModel } from './schemaGrant'; export { DefaultPrivilegeModel } from './defaultPrivilege'; export { EnumModel } from './enum'; @@ -68,6 +69,8 @@ export { BlueprintModel } from './blueprint'; export { BlueprintTemplateModel } from './blueprintTemplate'; export { BlueprintConstructionModel } from './blueprintConstruction'; export { StorageModuleModel } from './storageModule'; +export { EntityTypeProvisionModel } from './entityTypeProvision'; +export { WebauthnCredentialsModuleModel } from './webauthnCredentialsModule'; export { DatabaseProvisionModuleModel } from './databaseProvisionModule'; export { AppAdminGrantModel } from './appAdminGrant'; export { AppOwnerGrantModel } from './appOwnerGrant'; @@ -76,6 +79,7 @@ export { OrgMembershipModel } from './orgMembership'; export { OrgMemberModel } from './orgMember'; export { OrgAdminGrantModel } from './orgAdminGrant'; export { OrgOwnerGrantModel } from './orgOwnerGrant'; +export { OrgMemberProfileModel } from './orgMemberProfile'; export { OrgGrantModel } from './orgGrant'; export { OrgChartEdgeModel } from './orgChartEdge'; export { OrgChartEdgeGrantModel } from './orgChartEdgeGrant'; @@ -88,7 +92,6 @@ export { AppLevelModel } from './appLevel'; export { EmailModel } from './email'; export { PhoneNumberModel } from './phoneNumber'; export { CryptoAddressModel } from './cryptoAddress'; -export { ConnectedAccountModel } from './connectedAccount'; export { AppInviteModel } from './appInvite'; export { AppClaimedInviteModel } from './appClaimedInvite'; export { OrgInviteModel } from './orgInvite'; @@ -101,10 +104,12 @@ export { RoleTypeModel } from './roleType'; export { MigrateFileModel } from './migrateFile'; export { AppLimitDefaultModel } from './appLimitDefault'; export { OrgLimitDefaultModel } from './orgLimitDefault'; -export { MembershipTypeModel } from './membershipType'; +export { DevicesModuleModel } from './devicesModule'; +export { UserConnectedAccountModel } from './userConnectedAccount'; export { AppMembershipDefaultModel } from './appMembershipDefault'; export { CommitModel } from './commit'; export { RateLimitsModuleModel } from './rateLimitsModule'; +export { MembershipTypeModel } from './membershipType'; export { OrgMembershipDefaultModel } from './orgMembershipDefault'; export { RlsModuleModel } from './rlsModule'; export { SqlActionModel } from './sqlAction'; diff --git a/sdk/constructive-react/src/auth/orm/models/connectedAccount.ts b/sdk/constructive-cli/src/public/orm/models/orgMemberProfile.ts similarity index 52% rename from sdk/constructive-react/src/auth/orm/models/connectedAccount.ts rename to sdk/constructive-cli/src/public/orm/models/orgMemberProfile.ts index c9def156d..de551ba79 100644 --- a/sdk/constructive-react/src/auth/orm/models/connectedAccount.ts +++ b/sdk/constructive-cli/src/public/orm/models/orgMemberProfile.ts @@ -1,5 +1,5 @@ /** - * ConnectedAccount model for ORM client + * OrgMemberProfile model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - ConnectedAccount, - ConnectedAccountWithRelations, - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy, - CreateConnectedAccountInput, - UpdateConnectedAccountInput, - ConnectedAccountPatch, + OrgMemberProfile, + OrgMemberProfileWithRelations, + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, + CreateOrgMemberProfileInput, + UpdateOrgMemberProfileInput, + OrgMemberProfilePatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class ConnectedAccountModel { +export class OrgMemberProfileModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccounts: ConnectionResult>; + orgMemberProfiles: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: args?.where, @@ -56,58 +56,58 @@ export class ConnectedAccountModel { before: args?.before, offset: args?.offset, }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccounts: { - nodes: InferSelectResult[]; + orgMemberProfiles: { + nodes: InferSelectResult[]; }; }> { const { document, variables } = buildFindFirstDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: args?.where, }, - 'ConnectedAccountFilter', + 'OrgMemberProfileFilter', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', document, variables, }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccount: InferSelectResult | null; + orgMemberProfile: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: { @@ -117,90 +117,90 @@ export class ConnectedAccountModel { }, first: 1, }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfile', document, variables, transform: (data: { - connectedAccounts?: { - nodes?: InferSelectResult[]; + orgMemberProfiles?: { + nodes?: InferSelectResult[]; }; }) => ({ - connectedAccount: data.connectedAccounts?.nodes?.[0] ?? null, + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createConnectedAccount: { - connectedAccount: InferSelectResult; + createOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'ConnectedAccount', - 'createConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'createOrgMemberProfile', + 'orgMemberProfile', args.select, args.data, - 'CreateConnectedAccountInput', + 'CreateOrgMemberProfileInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'createConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'createOrgMemberProfile', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - ConnectedAccountPatch + OrgMemberProfilePatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateConnectedAccount: { - connectedAccount: InferSelectResult; + updateOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'ConnectedAccount', - 'updateConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'updateOrgMemberProfile', + 'orgMemberProfile', args.select, args.where.id, args.data, - 'UpdateConnectedAccountInput', + 'UpdateOrgMemberProfileInput', 'id', - 'connectedAccountPatch', + 'orgMemberProfilePatch', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'updateConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'updateOrgMemberProfile', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -208,28 +208,28 @@ export class ConnectedAccountModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteConnectedAccount: { - connectedAccount: InferSelectResult; + deleteOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'ConnectedAccount', - 'deleteConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'deleteOrgMemberProfile', + 'orgMemberProfile', { id: args.where.id, }, - 'DeleteConnectedAccountInput', + 'DeleteOrgMemberProfileInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'deleteConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'deleteOrgMemberProfile', document, variables, }); diff --git a/sdk/constructive-cli/src/public/orm/models/sessionSecretsModule.ts b/sdk/constructive-cli/src/public/orm/models/sessionSecretsModule.ts new file mode 100644 index 000000000..b333c87f0 --- /dev/null +++ b/sdk/constructive-cli/src/public/orm/models/sessionSecretsModule.ts @@ -0,0 +1,239 @@ +/** + * SessionSecretsModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + SessionSecretsModule, + SessionSecretsModuleWithRelations, + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy, + CreateSessionSecretsModuleInput, + UpdateSessionSecretsModuleInput, + SessionSecretsModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class SessionSecretsModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + sessionSecretsModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'SessionSecretsModule', + 'sessionSecretsModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'SessionSecretsModuleFilter', + 'SessionSecretsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SessionSecretsModule', + fieldName: 'sessionSecretsModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + sessionSecretsModules: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'SessionSecretsModule', + 'sessionSecretsModules', + args.select, + { + where: args?.where, + }, + 'SessionSecretsModuleFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SessionSecretsModule', + fieldName: 'sessionSecretsModules', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + sessionSecretsModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'SessionSecretsModule', + 'sessionSecretsModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'SessionSecretsModuleFilter', + 'SessionSecretsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SessionSecretsModule', + fieldName: 'sessionSecretsModule', + document, + variables, + transform: (data: { + sessionSecretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sessionSecretsModule: data.sessionSecretsModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'SessionSecretsModule', + 'createSessionSecretsModule', + 'sessionSecretsModule', + args.select, + args.data, + 'CreateSessionSecretsModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SessionSecretsModule', + fieldName: 'createSessionSecretsModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + SessionSecretsModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'SessionSecretsModule', + 'updateSessionSecretsModule', + 'sessionSecretsModule', + args.select, + args.where.id, + args.data, + 'UpdateSessionSecretsModuleInput', + 'id', + 'sessionSecretsModulePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SessionSecretsModule', + fieldName: 'updateSessionSecretsModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'SessionSecretsModule', + 'deleteSessionSecretsModule', + 'sessionSecretsModule', + { + id: args.where.id, + }, + 'DeleteSessionSecretsModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SessionSecretsModule', + fieldName: 'deleteSessionSecretsModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/public/orm/models/spatialRelation.ts b/sdk/constructive-cli/src/public/orm/models/spatialRelation.ts new file mode 100644 index 000000000..c1d09c31a --- /dev/null +++ b/sdk/constructive-cli/src/public/orm/models/spatialRelation.ts @@ -0,0 +1,237 @@ +/** + * SpatialRelation model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + SpatialRelation, + SpatialRelationWithRelations, + SpatialRelationSelect, + SpatialRelationFilter, + SpatialRelationOrderBy, + CreateSpatialRelationInput, + UpdateSpatialRelationInput, + SpatialRelationPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class SpatialRelationModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + spatialRelations: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'SpatialRelation', + 'spatialRelations', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'SpatialRelationFilter', + 'SpatialRelationOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SpatialRelation', + fieldName: 'spatialRelations', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + spatialRelations: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'SpatialRelation', + 'spatialRelations', + args.select, + { + where: args?.where, + }, + 'SpatialRelationFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SpatialRelation', + fieldName: 'spatialRelations', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + spatialRelation: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'SpatialRelation', + 'spatialRelations', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'SpatialRelationFilter', + 'SpatialRelationOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SpatialRelation', + fieldName: 'spatialRelation', + document, + variables, + transform: (data: { + spatialRelations?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + spatialRelation: data.spatialRelations?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'SpatialRelation', + 'createSpatialRelation', + 'spatialRelation', + args.select, + args.data, + 'CreateSpatialRelationInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SpatialRelation', + fieldName: 'createSpatialRelation', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + SpatialRelationPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'SpatialRelation', + 'updateSpatialRelation', + 'spatialRelation', + args.select, + args.where.id, + args.data, + 'UpdateSpatialRelationInput', + 'id', + 'spatialRelationPatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SpatialRelation', + fieldName: 'updateSpatialRelation', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'SpatialRelation', + 'deleteSpatialRelation', + 'spatialRelation', + { + id: args.where.id, + }, + 'DeleteSpatialRelationInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SpatialRelation', + fieldName: 'deleteSpatialRelation', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/public/orm/models/userConnectedAccount.ts b/sdk/constructive-cli/src/public/orm/models/userConnectedAccount.ts new file mode 100644 index 000000000..45bbea7f4 --- /dev/null +++ b/sdk/constructive-cli/src/public/orm/models/userConnectedAccount.ts @@ -0,0 +1,169 @@ +/** + * UserConnectedAccount model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + UserConnectedAccount, + UserConnectedAccountWithRelations, + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, + CreateUserConnectedAccountInput, + UpdateUserConnectedAccountInput, + UserConnectedAccountPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserConnectedAccountModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + }, + 'UserConnectedAccountFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccount: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccount', + document, + variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserConnectedAccount: { + userConnectedAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserConnectedAccount', + 'createUserConnectedAccount', + 'userConnectedAccount', + args.select, + args.data, + 'CreateUserConnectedAccountInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserConnectedAccount', + fieldName: 'createUserConnectedAccount', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/public/orm/models/webauthnCredentialsModule.ts b/sdk/constructive-cli/src/public/orm/models/webauthnCredentialsModule.ts new file mode 100644 index 000000000..78e687c34 --- /dev/null +++ b/sdk/constructive-cli/src/public/orm/models/webauthnCredentialsModule.ts @@ -0,0 +1,239 @@ +/** + * WebauthnCredentialsModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + WebauthnCredentialsModule, + WebauthnCredentialsModuleWithRelations, + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy, + CreateWebauthnCredentialsModuleInput, + UpdateWebauthnCredentialsModuleInput, + WebauthnCredentialsModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class WebauthnCredentialsModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + webauthnCredentialsModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'WebauthnCredentialsModule', + 'webauthnCredentialsModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'WebauthnCredentialsModuleFilter', + 'WebauthnCredentialsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'WebauthnCredentialsModule', + fieldName: 'webauthnCredentialsModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + webauthnCredentialsModules: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'WebauthnCredentialsModule', + 'webauthnCredentialsModules', + args.select, + { + where: args?.where, + }, + 'WebauthnCredentialsModuleFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'WebauthnCredentialsModule', + fieldName: 'webauthnCredentialsModules', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + webauthnCredentialsModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'WebauthnCredentialsModule', + 'webauthnCredentialsModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'WebauthnCredentialsModuleFilter', + 'WebauthnCredentialsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'WebauthnCredentialsModule', + fieldName: 'webauthnCredentialsModule', + document, + variables, + transform: (data: { + webauthnCredentialsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredentialsModule: data.webauthnCredentialsModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'WebauthnCredentialsModule', + 'createWebauthnCredentialsModule', + 'webauthnCredentialsModule', + args.select, + args.data, + 'CreateWebauthnCredentialsModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'WebauthnCredentialsModule', + fieldName: 'createWebauthnCredentialsModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + WebauthnCredentialsModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'WebauthnCredentialsModule', + 'updateWebauthnCredentialsModule', + 'webauthnCredentialsModule', + args.select, + args.where.id, + args.data, + 'UpdateWebauthnCredentialsModuleInput', + 'id', + 'webauthnCredentialsModulePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'WebauthnCredentialsModule', + fieldName: 'updateWebauthnCredentialsModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'WebauthnCredentialsModule', + 'deleteWebauthnCredentialsModule', + 'webauthnCredentialsModule', + { + id: args.where.id, + }, + 'DeleteWebauthnCredentialsModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'WebauthnCredentialsModule', + fieldName: 'deleteWebauthnCredentialsModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-cli/src/public/orm/mutation/index.ts b/sdk/constructive-cli/src/public/orm/mutation/index.ts index dfdfb23ab..1cd5aec35 100644 --- a/sdk/constructive-cli/src/public/orm/mutation/index.ts +++ b/sdk/constructive-cli/src/public/orm/mutation/index.ts @@ -12,6 +12,9 @@ import type { AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, + DisconnectAccountInput, + RevokeApiKeyInput, + RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, SubmitAppInviteCodeInput, @@ -23,9 +26,12 @@ import type { FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, + ProvisionNewUserInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, + CreateApiKeyInput, + ProvisionSpatialRelationInput, BootstrapUserInput, SetFieldOrderInput, ProvisionUniqueConstraintInput, @@ -39,12 +45,12 @@ import type { SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, - SignInOneTimeTokenInput, + SignInCrossOriginInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, - SignInInput, SignUpInput, - OneTimeTokenInput, + RequestCrossOriginTokenInput, + SignInInput, ProvisionTableInput, SendVerificationEmailInput, ForgotPasswordInput, @@ -56,6 +62,9 @@ import type { AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, + DisconnectAccountPayload, + RevokeApiKeyPayload, + RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, SubmitAppInviteCodePayload, @@ -67,9 +76,12 @@ import type { FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, + ProvisionNewUserPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, + CreateApiKeyPayload, + ProvisionSpatialRelationPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionUniqueConstraintPayload, @@ -83,12 +95,12 @@ import type { SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, - SignInOneTimeTokenPayload, + SignInCrossOriginPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, - SignInPayload, SignUpPayload, - OneTimeTokenPayload, + RequestCrossOriginTokenPayload, + SignInPayload, ProvisionTablePayload, SendVerificationEmailPayload, ForgotPasswordPayload, @@ -100,6 +112,9 @@ import type { AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, + DisconnectAccountPayloadSelect, + RevokeApiKeyPayloadSelect, + RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, SubmitAppInviteCodePayloadSelect, @@ -111,9 +126,12 @@ import type { FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, + ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, + CreateApiKeyPayloadSelect, + ProvisionSpatialRelationPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionUniqueConstraintPayloadSelect, @@ -127,12 +145,12 @@ import type { SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, - SignInOneTimeTokenPayloadSelect, + SignInCrossOriginPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, - SignInPayloadSelect, SignUpPayloadSelect, - OneTimeTokenPayloadSelect, + RequestCrossOriginTokenPayloadSelect, + SignInPayloadSelect, ProvisionTablePayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, @@ -156,6 +174,15 @@ export interface CancelDatabaseTransferVariables { export interface RejectDatabaseTransferVariables { input: RejectDatabaseTransferInput; } +export interface DisconnectAccountVariables { + input: DisconnectAccountInput; +} +export interface RevokeApiKeyVariables { + input: RevokeApiKeyInput; +} +export interface RevokeSessionVariables { + input: RevokeSessionInput; +} export interface VerifyPasswordVariables { input: VerifyPasswordInput; } @@ -188,11 +215,14 @@ export interface InitEmptyRepoVariables { } /** * Variables for constructBlueprint - * Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. + * 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. */ export interface ConstructBlueprintVariables { input: ConstructBlueprintInput; } +export interface ProvisionNewUserVariables { + input: ProvisionNewUserInput; +} export interface ResetPasswordVariables { input: ResetPasswordInput; } @@ -206,6 +236,16 @@ export interface RemoveNodeAtPathVariables { export interface CopyTemplateToBlueprintVariables { input: CopyTemplateToBlueprintInput; } +export interface CreateApiKeyVariables { + input: CreateApiKeyInput; +} +/** + * Variables for provisionSpatialRelation + * Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + */ +export interface ProvisionSpatialRelationVariables { + input: ProvisionSpatialRelationInput; +} export interface BootstrapUserVariables { input: BootstrapUserInput; } @@ -261,8 +301,8 @@ export interface ProvisionRelationVariables { export interface ApplyRlsVariables { input: ApplyRlsInput; } -export interface SignInOneTimeTokenVariables { - input: SignInOneTimeTokenInput; +export interface SignInCrossOriginVariables { + input: SignInCrossOriginInput; } /** * Variables for createUserDatabase @@ -289,14 +329,14 @@ export interface CreateUserDatabaseVariables { export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; } -export interface SignInVariables { - input: SignInInput; -} export interface SignUpVariables { input: SignUpInput; } -export interface OneTimeTokenVariables { - input: OneTimeTokenInput; +export interface RequestCrossOriginTokenVariables { + input: RequestCrossOriginTokenInput; +} +export interface SignInVariables { + input: SignInInput; } /** * Variables for provisionTable @@ -487,6 +527,93 @@ export function createMutationOperations(client: OrmClient) { 'RejectDatabaseTransferPayload' ), }), + disconnectAccount: ( + args: DisconnectAccountVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + disconnectAccount: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'DisconnectAccount', + fieldName: 'disconnectAccount', + ...buildCustomDocument( + 'mutation', + 'DisconnectAccount', + 'disconnectAccount', + options.select, + args, + [ + { + name: 'input', + type: 'DisconnectAccountInput!', + }, + ], + connectionFieldsMap, + 'DisconnectAccountPayload' + ), + }), + revokeApiKey: ( + args: RevokeApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeApiKey', + fieldName: 'revokeApiKey', + ...buildCustomDocument( + 'mutation', + 'RevokeApiKey', + 'revokeApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeApiKeyInput!', + }, + ], + connectionFieldsMap, + 'RevokeApiKeyPayload' + ), + }), + revokeSession: ( + args: RevokeSessionVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeSession: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeSession', + fieldName: 'revokeSession', + ...buildCustomDocument( + 'mutation', + 'RevokeSession', + 'revokeSession', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeSessionInput!', + }, + ], + connectionFieldsMap, + 'RevokeSessionPayload' + ), + }), verifyPassword: ( args: VerifyPasswordVariables, options: { @@ -806,6 +933,35 @@ export function createMutationOperations(client: OrmClient) { 'ConstructBlueprintPayload' ), }), + provisionNewUser: ( + args: ProvisionNewUserVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + provisionNewUser: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ProvisionNewUser', + fieldName: 'provisionNewUser', + ...buildCustomDocument( + 'mutation', + 'ProvisionNewUser', + 'provisionNewUser', + options.select, + args, + [ + { + name: 'input', + type: 'ProvisionNewUserInput!', + }, + ], + connectionFieldsMap, + 'ProvisionNewUserPayload' + ), + }), resetPassword: ( args: ResetPasswordVariables, options: { @@ -893,6 +1049,64 @@ export function createMutationOperations(client: OrmClient) { 'CopyTemplateToBlueprintPayload' ), }), + createApiKey: ( + args: CreateApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + createApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'CreateApiKey', + fieldName: 'createApiKey', + ...buildCustomDocument( + 'mutation', + 'CreateApiKey', + 'createApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'CreateApiKeyInput!', + }, + ], + connectionFieldsMap, + 'CreateApiKeyPayload' + ), + }), + provisionSpatialRelation: ( + args: ProvisionSpatialRelationVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + provisionSpatialRelation: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ProvisionSpatialRelation', + fieldName: 'provisionSpatialRelation', + ...buildCustomDocument( + 'mutation', + 'ProvisionSpatialRelation', + 'provisionSpatialRelation', + options.select, + args, + [ + { + name: 'input', + type: 'ProvisionSpatialRelationInput!', + }, + ], + connectionFieldsMap, + 'ProvisionSpatialRelationPayload' + ), + }), bootstrapUser: ( args: BootstrapUserVariables, options: { @@ -1270,33 +1484,33 @@ export function createMutationOperations(client: OrmClient) { 'ApplyRlsPayload' ), }), - signInOneTimeToken: ( - args: SignInOneTimeTokenVariables, + signInCrossOrigin: ( + args: SignInCrossOriginVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signInOneTimeToken: InferSelectResult | null; + signInCrossOrigin: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignInOneTimeToken', - fieldName: 'signInOneTimeToken', + operationName: 'SignInCrossOrigin', + fieldName: 'signInCrossOrigin', ...buildCustomDocument( 'mutation', - 'SignInOneTimeToken', - 'signInOneTimeToken', + 'SignInCrossOrigin', + 'signInCrossOrigin', options.select, args, [ { name: 'input', - type: 'SignInOneTimeTokenInput!', + type: 'SignInCrossOriginInput!', }, ], connectionFieldsMap, - 'SignInOneTimeTokenPayload' + 'SignInCrossOriginPayload' ), }), createUserDatabase: ( @@ -1357,91 +1571,91 @@ export function createMutationOperations(client: OrmClient) { 'ExtendTokenExpiresPayload' ), }), - signIn: ( - args: SignInVariables, + signUp: ( + args: SignUpVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signIn: InferSelectResult | null; + signUp: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignIn', - fieldName: 'signIn', + operationName: 'SignUp', + fieldName: 'signUp', ...buildCustomDocument( 'mutation', - 'SignIn', - 'signIn', + 'SignUp', + 'signUp', options.select, args, [ { name: 'input', - type: 'SignInInput!', + type: 'SignUpInput!', }, ], connectionFieldsMap, - 'SignInPayload' + 'SignUpPayload' ), }), - signUp: ( - args: SignUpVariables, + requestCrossOriginToken: ( + args: RequestCrossOriginTokenVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signUp: InferSelectResult | null; + requestCrossOriginToken: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignUp', - fieldName: 'signUp', + operationName: 'RequestCrossOriginToken', + fieldName: 'requestCrossOriginToken', ...buildCustomDocument( 'mutation', - 'SignUp', - 'signUp', + 'RequestCrossOriginToken', + 'requestCrossOriginToken', options.select, args, [ { name: 'input', - type: 'SignUpInput!', + type: 'RequestCrossOriginTokenInput!', }, ], connectionFieldsMap, - 'SignUpPayload' + 'RequestCrossOriginTokenPayload' ), }), - oneTimeToken: ( - args: OneTimeTokenVariables, + signIn: ( + args: SignInVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - oneTimeToken: InferSelectResult | null; + signIn: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'OneTimeToken', - fieldName: 'oneTimeToken', + operationName: 'SignIn', + fieldName: 'signIn', ...buildCustomDocument( 'mutation', - 'OneTimeToken', - 'oneTimeToken', + 'SignIn', + 'signIn', options.select, args, [ { name: 'input', - type: 'OneTimeTokenInput!', + type: 'SignInInput!', }, ], connectionFieldsMap, - 'OneTimeTokenPayload' + 'SignInPayload' ), }), provisionTable: ( diff --git a/sdk/constructive-cli/src/public/orm/query/index.ts b/sdk/constructive-cli/src/public/orm/query/index.ts index 424b81e24..d79ab541d 100644 --- a/sdk/constructive-cli/src/public/orm/query/index.ts +++ b/sdk/constructive-cli/src/public/orm/query/index.ts @@ -17,6 +17,9 @@ import type { AppLevelRequirementConnection, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; +export interface RequireStepUpVariables { + stepUpType?: string; +} export interface AppPermissionsGetPaddedMaskVariables { mask?: string; } @@ -32,6 +35,15 @@ export interface RevParseVariables { storeId?: string; refname?: string; } +/** + * Variables for resolveBlueprintField + * Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + */ +export interface ResolveBlueprintFieldVariables { + databaseId?: string; + tableId?: string; + fieldName?: string; +} export interface OrgIsManagerOfVariables { pEntityId?: string; pManagerId?: string; @@ -152,6 +164,25 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + currentUserAgent: (options?: { select?: Record }) => + new QueryBuilder<{ + currentUserAgent: string | null; + }>({ + client, + operation: 'query', + operationName: 'CurrentUserAgent', + fieldName: 'currentUserAgent', + ...buildCustomDocument( + 'query', + 'CurrentUserAgent', + 'currentUserAgent', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), currentIpAddress: (options?: { select?: Record }) => new QueryBuilder<{ currentIpAddress: string | null; @@ -171,21 +202,31 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentUserAgent: (options?: { select?: Record }) => + requireStepUp: ( + args: RequireStepUpVariables, + options?: { + select?: Record; + } + ) => new QueryBuilder<{ - currentUserAgent: string | null; + requireStepUp: boolean | null; }>({ client, operation: 'query', - operationName: 'CurrentUserAgent', - fieldName: 'currentUserAgent', + operationName: 'RequireStepUp', + fieldName: 'requireStepUp', ...buildCustomDocument( 'query', - 'CurrentUserAgent', - 'currentUserAgent', + 'RequireStepUp', + 'requireStepUp', options?.select, - undefined, - [], + args, + [ + { + name: 'stepUpType', + type: 'String', + }, + ], connectionFieldsMap, undefined ), @@ -318,6 +359,43 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + resolveBlueprintField: ( + args: ResolveBlueprintFieldVariables, + options?: { + select?: Record; + } + ) => + new QueryBuilder<{ + resolveBlueprintField: string | null; + }>({ + client, + operation: 'query', + operationName: 'ResolveBlueprintField', + fieldName: 'resolveBlueprintField', + ...buildCustomDocument( + 'query', + 'ResolveBlueprintField', + 'resolveBlueprintField', + options?.select, + args, + [ + { + name: 'databaseId', + type: 'UUID', + }, + { + name: 'tableId', + type: 'UUID', + }, + { + name: 'fieldName', + type: 'String', + }, + ], + connectionFieldsMap, + undefined + ), + }), orgIsManagerOf: ( args: OrgIsManagerOfVariables, options?: { diff --git a/sdk/constructive-react/src/admin/README.md b/sdk/constructive-react/src/admin/README.md index 8b18b783c..52cb07d46 100644 --- a/sdk/constructive-react/src/admin/README.md +++ b/sdk/constructive-react/src/admin/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 32 +- **Tables:** 33 - **Custom queries:** 11 - **Custom mutations:** 5 diff --git a/sdk/constructive-react/src/admin/hooks/README.md b/sdk/constructive-react/src/admin/hooks/README.md index 4805f0461..838b84669 100644 --- a/sdk/constructive-react/src/admin/hooks/README.md +++ b/sdk/constructive-react/src/admin/hooks/README.md @@ -96,11 +96,6 @@ function App() { | `useCreateOrgOwnerGrantMutation` | Mutation | Records of ownership transfers and grants between members | | `useUpdateOrgOwnerGrantMutation` | Mutation | Records of ownership transfers and grants between members | | `useDeleteOrgOwnerGrantMutation` | Mutation | Records of ownership transfers and grants between members | -| `useMembershipTypesQuery` | Query | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | -| `useMembershipTypeQuery` | Query | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | -| `useCreateMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | -| `useUpdateMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | -| `useDeleteMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | | `useAppLimitsQuery` | Query | Tracks per-actor usage counts against configurable maximum limits | | `useAppLimitQuery` | Query | Tracks per-actor usage counts against configurable maximum limits | | `useCreateAppLimitMutation` | Mutation | Tracks per-actor usage counts against configurable maximum limits | @@ -131,6 +126,11 @@ function App() { | `useCreateOrgLimitMutation` | Mutation | Tracks per-actor usage counts against configurable maximum limits | | `useUpdateOrgLimitMutation` | Mutation | Tracks per-actor usage counts against configurable maximum limits | | `useDeleteOrgLimitMutation` | Mutation | Tracks per-actor usage counts against configurable maximum limits | +| `useMembershipTypesQuery` | Query | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | +| `useMembershipTypeQuery` | Query | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | +| `useCreateMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | +| `useUpdateMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | +| `useDeleteMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | | `useAppGrantsQuery` | Query | Records of individual permission grants and revocations for members via bitmask | | `useAppGrantQuery` | Query | Records of individual permission grants and revocations for members via bitmask | | `useCreateAppGrantMutation` | Mutation | Records of individual permission grants and revocations for members via bitmask | @@ -161,6 +161,11 @@ function App() { | `useCreateOrgMembershipDefaultMutation` | Mutation | Default membership settings per entity, controlling initial approval and verification state for new members | | `useUpdateOrgMembershipDefaultMutation` | Mutation | Default membership settings per entity, controlling initial approval and verification state for new members | | `useDeleteOrgMembershipDefaultMutation` | Mutation | Default membership settings per entity, controlling initial approval and verification state for new members | +| `useOrgMemberProfilesQuery` | Query | Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) | +| `useOrgMemberProfileQuery` | Query | Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) | +| `useCreateOrgMemberProfileMutation` | Mutation | Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) | +| `useUpdateOrgMemberProfileMutation` | Mutation | Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) | +| `useDeleteOrgMemberProfileMutation` | Mutation | Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) | | `useAppLevelsQuery` | Query | Defines available levels that users can achieve by completing requirements | | `useAppLevelQuery` | Query | Defines available levels that users can achieve by completing requirements | | `useCreateAppLevelMutation` | Mutation | Defines available levels that users can achieve by completing requirements | @@ -171,6 +176,11 @@ function App() { | `useCreateAppInviteMutation` | Mutation | Invitation records sent to prospective members via email, with token-based redemption and expiration | | `useUpdateAppInviteMutation` | Mutation | Invitation records sent to prospective members via email, with token-based redemption and expiration | | `useDeleteAppInviteMutation` | Mutation | Invitation records sent to prospective members via email, with token-based redemption and expiration | +| `useOrgInvitesQuery` | Query | Invitation records sent to prospective members via email, with token-based redemption and expiration | +| `useOrgInviteQuery` | Query | Invitation records sent to prospective members via email, with token-based redemption and expiration | +| `useCreateOrgInviteMutation` | Mutation | Invitation records sent to prospective members via email, with token-based redemption and expiration | +| `useUpdateOrgInviteMutation` | Mutation | Invitation records sent to prospective members via email, with token-based redemption and expiration | +| `useDeleteOrgInviteMutation` | Mutation | Invitation records sent to prospective members via email, with token-based redemption and expiration | | `useAppMembershipsQuery` | Query | Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status | | `useAppMembershipQuery` | Query | Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status | | `useCreateAppMembershipMutation` | Mutation | Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status | @@ -181,11 +191,6 @@ function App() { | `useCreateOrgMembershipMutation` | Mutation | Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status | | `useUpdateOrgMembershipMutation` | Mutation | Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status | | `useDeleteOrgMembershipMutation` | Mutation | Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status | -| `useOrgInvitesQuery` | Query | Invitation records sent to prospective members via email, with token-based redemption and expiration | -| `useOrgInviteQuery` | Query | Invitation records sent to prospective members via email, with token-based redemption and expiration | -| `useCreateOrgInviteMutation` | Mutation | Invitation records sent to prospective members via email, with token-based redemption and expiration | -| `useUpdateOrgInviteMutation` | Mutation | Invitation records sent to prospective members via email, with token-based redemption and expiration | -| `useDeleteOrgInviteMutation` | Mutation | Invitation records sent to prospective members via email, with token-based redemption and expiration | | `useAppPermissionsGetPaddedMaskQuery` | Query | appPermissionsGetPaddedMask | | `useOrgPermissionsGetPaddedMaskQuery` | Query | orgPermissionsGetPaddedMask | | `useOrgIsManagerOfQuery` | Query | orgIsManagerOf | @@ -495,27 +500,6 @@ const { mutate: create } = useCreateOrgOwnerGrantMutation({ create({ isGrant: '', actorId: '', entityId: '', grantorId: '' }); ``` -### MembershipType - -```typescript -// List all membershipTypes -const { data, isLoading } = useMembershipTypesQuery({ - selection: { fields: { id: true, name: true, description: true, prefix: true } }, -}); - -// Get one membershipType -const { data: item } = useMembershipTypeQuery({ - id: '', - selection: { fields: { id: true, name: true, description: true, prefix: true } }, -}); - -// Create a membershipType -const { mutate: create } = useCreateMembershipTypeMutation({ - selection: { fields: { id: true } }, -}); -create({ name: '', description: '', prefix: '' }); -``` - ### AppLimit ```typescript @@ -642,6 +626,27 @@ const { mutate: create } = useCreateOrgLimitMutation({ create({ name: '', actorId: '', num: '', max: '', entityId: '' }); ``` +### MembershipType + +```typescript +// List all membershipTypes +const { data, isLoading } = useMembershipTypesQuery({ + selection: { fields: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }, +}); + +// Get one membershipType +const { data: item } = useMembershipTypeQuery({ + id: '', + selection: { fields: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }, +}); + +// Create a membershipType +const { mutate: create } = useCreateMembershipTypeMutation({ + selection: { fields: { id: true } }, +}); +create({ name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }); +``` + ### AppGrant ```typescript @@ -768,6 +773,27 @@ const { mutate: create } = useCreateOrgMembershipDefaultMutation({ create({ createdBy: '', updatedBy: '', isApproved: '', entityId: '', deleteMemberCascadeGroups: '', createGroupsCascadeMembers: '' }); ``` +### OrgMemberProfile + +```typescript +// List all orgMemberProfiles +const { data, isLoading } = useOrgMemberProfilesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }, +}); + +// Get one orgMemberProfile +const { data: item } = useOrgMemberProfileQuery({ + id: '', + selection: { fields: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }, +}); + +// Create a orgMemberProfile +const { mutate: create } = useCreateOrgMemberProfileMutation({ + selection: { fields: { id: true } }, +}); +create({ membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }); +``` + ### AppLevel ```typescript @@ -810,25 +836,46 @@ const { mutate: create } = useCreateAppInviteMutation({ create({ email: '', senderId: '', inviteToken: '', inviteValid: '', inviteLimit: '', inviteCount: '', multiple: '', data: '', expiresAt: '' }); ``` +### OrgInvite + +```typescript +// List all orgInvites +const { data, isLoading } = useOrgInvitesQuery({ + selection: { fields: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }, +}); + +// Get one orgInvite +const { data: item } = useOrgInviteQuery({ + id: '', + selection: { fields: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }, +}); + +// Create a orgInvite +const { mutate: create } = useCreateOrgInviteMutation({ + selection: { fields: { id: true } }, +}); +create({ email: '', senderId: '', receiverId: '', inviteToken: '', inviteValid: '', inviteLimit: '', inviteCount: '', multiple: '', data: '', expiresAt: '', entityId: '' }); +``` + ### AppMembership ```typescript // List all appMemberships const { data, isLoading } = useAppMembershipsQuery({ - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, }); // Get one appMembership const { data: item } = useAppMembershipQuery({ id: '', - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, }); // Create a appMembership const { mutate: create } = useCreateAppMembershipMutation({ selection: { fields: { id: true } }, }); -create({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }); +create({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }); ``` ### OrgMembership @@ -836,41 +883,20 @@ create({ createdBy: '', updatedBy: '', isApproved: '', isBa ```typescript // List all orgMemberships const { data, isLoading } = useOrgMembershipsQuery({ - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }, }); // Get one orgMembership const { data: item } = useOrgMembershipQuery({ id: '', - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }, }); // Create a orgMembership const { mutate: create } = useCreateOrgMembershipMutation({ selection: { fields: { id: true } }, }); -create({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }); -``` - -### OrgInvite - -```typescript -// List all orgInvites -const { data, isLoading } = useOrgInvitesQuery({ - selection: { fields: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }, -}); - -// Get one orgInvite -const { data: item } = useOrgInviteQuery({ - id: '', - selection: { fields: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }, -}); - -// Create a orgInvite -const { mutate: create } = useCreateOrgInviteMutation({ - selection: { fields: { id: true } }, -}); -create({ email: '', senderId: '', receiverId: '', inviteToken: '', inviteValid: '', inviteLimit: '', inviteCount: '', multiple: '', data: '', expiresAt: '', entityId: '' }); +create({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }); ``` ## Custom Operation Hooks diff --git a/sdk/constructive-react/src/admin/hooks/index.ts b/sdk/constructive-react/src/admin/hooks/index.ts index ae021934e..8ee7ab51a 100644 --- a/sdk/constructive-react/src/admin/hooks/index.ts +++ b/sdk/constructive-react/src/admin/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: OrgGetManagersRecord, OrgGetSubordinatesRecord, AppPermission, OrgPermission, AppLevelRequirement, OrgMember, AppPermissionDefault, OrgPermissionDefault, AppAdminGrant, AppOwnerGrant, AppLimitDefault, OrgLimitDefault, OrgAdminGrant, OrgOwnerGrant, MembershipType, AppLimit, AppAchievement, AppStep, AppClaimedInvite, OrgChartEdgeGrant, OrgLimit, AppGrant, AppMembershipDefault, OrgClaimedInvite, OrgGrant, OrgChartEdge, OrgMembershipDefault, AppLevel, AppInvite, AppMembership, OrgMembership, OrgInvite + * Tables: OrgGetManagersRecord, OrgGetSubordinatesRecord, AppPermission, OrgPermission, AppLevelRequirement, OrgMember, AppPermissionDefault, OrgPermissionDefault, AppAdminGrant, AppOwnerGrant, AppLimitDefault, OrgLimitDefault, OrgAdminGrant, OrgOwnerGrant, AppLimit, AppAchievement, AppStep, AppClaimedInvite, OrgChartEdgeGrant, OrgLimit, MembershipType, AppGrant, AppMembershipDefault, OrgClaimedInvite, OrgGrant, OrgChartEdge, OrgMembershipDefault, OrgMemberProfile, AppLevel, AppInvite, OrgInvite, AppMembership, OrgMembership * * Usage: * diff --git a/sdk/constructive-react/src/admin/hooks/invalidation.ts b/sdk/constructive-react/src/admin/hooks/invalidation.ts index 4d923823f..f82369f6c 100644 --- a/sdk/constructive-react/src/admin/hooks/invalidation.ts +++ b/sdk/constructive-react/src/admin/hooks/invalidation.ts @@ -29,24 +29,25 @@ import { orgLimitDefaultKeys, orgAdminGrantKeys, orgOwnerGrantKeys, - membershipTypeKeys, appLimitKeys, appAchievementKeys, appStepKeys, appClaimedInviteKeys, orgChartEdgeGrantKeys, orgLimitKeys, + membershipTypeKeys, appGrantKeys, appMembershipDefaultKeys, orgClaimedInviteKeys, orgGrantKeys, orgChartEdgeKeys, orgMembershipDefaultKeys, + orgMemberProfileKeys, appLevelKeys, appInviteKeys, + orgInviteKeys, appMembershipKeys, orgMembershipKeys, - orgInviteKeys, } from './query-keys'; /** // ============================================================================ @@ -306,23 +307,6 @@ export const invalidate = { queryKey: orgOwnerGrantKeys.detail(id), }), }, - /** Invalidate membershipType queries */ membershipType: { - /** Invalidate all membershipType queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: membershipTypeKeys.all, - }), - /** Invalidate membershipType list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: membershipTypeKeys.lists(), - }), - /** Invalidate a specific membershipType */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: membershipTypeKeys.detail(id), - }), - }, /** Invalidate appLimit queries */ appLimit: { /** Invalidate all appLimit queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -416,6 +400,23 @@ export const invalidate = { queryKey: orgLimitKeys.detail(id), }), }, + /** Invalidate membershipType queries */ membershipType: { + /** Invalidate all membershipType queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: membershipTypeKeys.all, + }), + /** Invalidate membershipType list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: membershipTypeKeys.lists(), + }), + /** Invalidate a specific membershipType */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: membershipTypeKeys.detail(id), + }), + }, /** Invalidate appGrant queries */ appGrant: { /** Invalidate all appGrant queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -512,6 +513,23 @@ export const invalidate = { queryKey: orgMembershipDefaultKeys.detail(id), }), }, + /** Invalidate orgMemberProfile queries */ orgMemberProfile: { + /** Invalidate all orgMemberProfile queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.all, + }), + /** Invalidate orgMemberProfile list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.lists(), + }), + /** Invalidate a specific orgMemberProfile */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.detail(id), + }), + }, /** Invalidate appLevel queries */ appLevel: { /** Invalidate all appLevel queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -543,6 +561,23 @@ export const invalidate = { queryKey: appInviteKeys.detail(id), }), }, + /** Invalidate orgInvite queries */ orgInvite: { + /** Invalidate all orgInvite queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgInviteKeys.all, + }), + /** Invalidate orgInvite list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgInviteKeys.lists(), + }), + /** Invalidate a specific orgInvite */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: orgInviteKeys.detail(id), + }), + }, /** Invalidate appMembership queries */ appMembership: { /** Invalidate all appMembership queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -577,23 +612,6 @@ export const invalidate = { queryKey: orgMembershipKeys.detail(id), }), }, - /** Invalidate orgInvite queries */ orgInvite: { - /** Invalidate all orgInvite queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: orgInviteKeys.all, - }), - /** Invalidate orgInvite list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: orgInviteKeys.lists(), - }), - /** Invalidate a specific orgInvite */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: orgInviteKeys.detail(id), - }), - }, } as const; /** @@ -716,14 +734,6 @@ export const remove = { queryKey: orgOwnerGrantKeys.detail(id), }); }, - /** Remove membershipType from cache */ membershipType: ( - queryClient: QueryClient, - id: string | number - ) => { - queryClient.removeQueries({ - queryKey: membershipTypeKeys.detail(id), - }); - }, /** Remove appLimit from cache */ appLimit: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: appLimitKeys.detail(id), @@ -763,6 +773,14 @@ export const remove = { queryKey: orgLimitKeys.detail(id), }); }, + /** Remove membershipType from cache */ membershipType: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: membershipTypeKeys.detail(id), + }); + }, /** Remove appGrant from cache */ appGrant: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: appGrantKeys.detail(id), @@ -805,6 +823,14 @@ export const remove = { queryKey: orgMembershipDefaultKeys.detail(id), }); }, + /** Remove orgMemberProfile from cache */ orgMemberProfile: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: orgMemberProfileKeys.detail(id), + }); + }, /** Remove appLevel from cache */ appLevel: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: appLevelKeys.detail(id), @@ -815,6 +841,11 @@ export const remove = { queryKey: appInviteKeys.detail(id), }); }, + /** Remove orgInvite from cache */ orgInvite: (queryClient: QueryClient, id: string | number) => { + queryClient.removeQueries({ + queryKey: orgInviteKeys.detail(id), + }); + }, /** Remove appMembership from cache */ appMembership: ( queryClient: QueryClient, id: string | number @@ -831,9 +862,4 @@ export const remove = { queryKey: orgMembershipKeys.detail(id), }); }, - /** Remove orgInvite from cache */ orgInvite: (queryClient: QueryClient, id: string | number) => { - queryClient.removeQueries({ - queryKey: orgInviteKeys.detail(id), - }); - }, } as const; diff --git a/sdk/constructive-react/src/admin/hooks/mutation-keys.ts b/sdk/constructive-react/src/admin/hooks/mutation-keys.ts index de8189800..dd58d12aa 100644 --- a/sdk/constructive-react/src/admin/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/admin/hooks/mutation-keys.ts @@ -146,15 +146,6 @@ export const orgOwnerGrantMutationKeys = { /** Delete orgOwnerGrant mutation key */ delete: (id: string | number) => ['mutation', 'orgownergrant', 'delete', id] as const, } as const; -export const membershipTypeMutationKeys = { - /** All membershipType mutation keys */ all: ['mutation', 'membershiptype'] as const, - /** Create membershipType mutation key */ create: () => - ['mutation', 'membershiptype', 'create'] as const, - /** Update membershipType mutation key */ update: (id: string | number) => - ['mutation', 'membershiptype', 'update', id] as const, - /** Delete membershipType mutation key */ delete: (id: string | number) => - ['mutation', 'membershiptype', 'delete', id] as const, -} as const; export const appLimitMutationKeys = { /** All appLimit mutation keys */ all: ['mutation', 'applimit'] as const, /** Create appLimit mutation key */ create: () => ['mutation', 'applimit', 'create'] as const, @@ -206,6 +197,15 @@ export const orgLimitMutationKeys = { /** Delete orgLimit mutation key */ delete: (id: string | number) => ['mutation', 'orglimit', 'delete', id] as const, } as const; +export const membershipTypeMutationKeys = { + /** All membershipType mutation keys */ all: ['mutation', 'membershiptype'] as const, + /** Create membershipType mutation key */ create: () => + ['mutation', 'membershiptype', 'create'] as const, + /** Update membershipType mutation key */ update: (id: string | number) => + ['mutation', 'membershiptype', 'update', id] as const, + /** Delete membershipType mutation key */ delete: (id: string | number) => + ['mutation', 'membershiptype', 'delete', id] as const, +} as const; export const appGrantMutationKeys = { /** All appGrant mutation keys */ all: ['mutation', 'appgrant'] as const, /** Create appGrant mutation key */ create: () => ['mutation', 'appgrant', 'create'] as const, @@ -258,6 +258,15 @@ export const orgMembershipDefaultMutationKeys = { /** Delete orgMembershipDefault mutation key */ delete: (id: string | number) => ['mutation', 'orgmembershipdefault', 'delete', id] as const, } as const; +export const orgMemberProfileMutationKeys = { + /** All orgMemberProfile mutation keys */ all: ['mutation', 'orgmemberprofile'] as const, + /** Create orgMemberProfile mutation key */ create: () => + ['mutation', 'orgmemberprofile', 'create'] as const, + /** Update orgMemberProfile mutation key */ update: (id: string | number) => + ['mutation', 'orgmemberprofile', 'update', id] as const, + /** Delete orgMemberProfile mutation key */ delete: (id: string | number) => + ['mutation', 'orgmemberprofile', 'delete', id] as const, +} as const; export const appLevelMutationKeys = { /** All appLevel mutation keys */ all: ['mutation', 'applevel'] as const, /** Create appLevel mutation key */ create: () => ['mutation', 'applevel', 'create'] as const, @@ -274,6 +283,14 @@ export const appInviteMutationKeys = { /** Delete appInvite mutation key */ delete: (id: string | number) => ['mutation', 'appinvite', 'delete', id] as const, } as const; +export const orgInviteMutationKeys = { + /** All orgInvite mutation keys */ all: ['mutation', 'orginvite'] as const, + /** Create orgInvite mutation key */ create: () => ['mutation', 'orginvite', 'create'] as const, + /** Update orgInvite mutation key */ update: (id: string | number) => + ['mutation', 'orginvite', 'update', id] as const, + /** Delete orgInvite mutation key */ delete: (id: string | number) => + ['mutation', 'orginvite', 'delete', id] as const, +} as const; export const appMembershipMutationKeys = { /** All appMembership mutation keys */ all: ['mutation', 'appmembership'] as const, /** Create appMembership mutation key */ create: () => @@ -292,14 +309,6 @@ export const orgMembershipMutationKeys = { /** Delete orgMembership mutation key */ delete: (id: string | number) => ['mutation', 'orgmembership', 'delete', id] as const, } as const; -export const orgInviteMutationKeys = { - /** All orgInvite mutation keys */ all: ['mutation', 'orginvite'] as const, - /** Create orgInvite mutation key */ create: () => ['mutation', 'orginvite', 'create'] as const, - /** Update orgInvite mutation key */ update: (id: string | number) => - ['mutation', 'orginvite', 'update', id] as const, - /** Delete orgInvite mutation key */ delete: (id: string | number) => - ['mutation', 'orginvite', 'delete', id] as const, -} as const; // ============================================================================ // Custom Mutation Keys @@ -364,23 +373,24 @@ export const mutationKeys = { orgLimitDefault: orgLimitDefaultMutationKeys, orgAdminGrant: orgAdminGrantMutationKeys, orgOwnerGrant: orgOwnerGrantMutationKeys, - membershipType: membershipTypeMutationKeys, appLimit: appLimitMutationKeys, appAchievement: appAchievementMutationKeys, appStep: appStepMutationKeys, appClaimedInvite: appClaimedInviteMutationKeys, orgChartEdgeGrant: orgChartEdgeGrantMutationKeys, orgLimit: orgLimitMutationKeys, + membershipType: membershipTypeMutationKeys, appGrant: appGrantMutationKeys, appMembershipDefault: appMembershipDefaultMutationKeys, orgClaimedInvite: orgClaimedInviteMutationKeys, orgGrant: orgGrantMutationKeys, orgChartEdge: orgChartEdgeMutationKeys, orgMembershipDefault: orgMembershipDefaultMutationKeys, + orgMemberProfile: orgMemberProfileMutationKeys, appLevel: appLevelMutationKeys, appInvite: appInviteMutationKeys, + orgInvite: orgInviteMutationKeys, appMembership: appMembershipMutationKeys, orgMembership: orgMembershipMutationKeys, - orgInvite: orgInviteMutationKeys, custom: customMutationKeys, } as const; diff --git a/sdk/constructive-react/src/admin/hooks/mutations/index.ts b/sdk/constructive-react/src/admin/hooks/mutations/index.ts index 1b1176d1f..f404996fc 100644 --- a/sdk/constructive-react/src/admin/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/index.ts @@ -41,9 +41,6 @@ export * from './useDeleteOrgAdminGrantMutation'; export * from './useCreateOrgOwnerGrantMutation'; export * from './useUpdateOrgOwnerGrantMutation'; export * from './useDeleteOrgOwnerGrantMutation'; -export * from './useCreateMembershipTypeMutation'; -export * from './useUpdateMembershipTypeMutation'; -export * from './useDeleteMembershipTypeMutation'; export * from './useCreateAppLimitMutation'; export * from './useUpdateAppLimitMutation'; export * from './useDeleteAppLimitMutation'; @@ -62,6 +59,9 @@ export * from './useDeleteOrgChartEdgeGrantMutation'; export * from './useCreateOrgLimitMutation'; export * from './useUpdateOrgLimitMutation'; export * from './useDeleteOrgLimitMutation'; +export * from './useCreateMembershipTypeMutation'; +export * from './useUpdateMembershipTypeMutation'; +export * from './useDeleteMembershipTypeMutation'; export * from './useCreateAppGrantMutation'; export * from './useUpdateAppGrantMutation'; export * from './useDeleteAppGrantMutation'; @@ -80,21 +80,24 @@ export * from './useDeleteOrgChartEdgeMutation'; export * from './useCreateOrgMembershipDefaultMutation'; export * from './useUpdateOrgMembershipDefaultMutation'; export * from './useDeleteOrgMembershipDefaultMutation'; +export * from './useCreateOrgMemberProfileMutation'; +export * from './useUpdateOrgMemberProfileMutation'; +export * from './useDeleteOrgMemberProfileMutation'; export * from './useCreateAppLevelMutation'; export * from './useUpdateAppLevelMutation'; export * from './useDeleteAppLevelMutation'; export * from './useCreateAppInviteMutation'; export * from './useUpdateAppInviteMutation'; export * from './useDeleteAppInviteMutation'; +export * from './useCreateOrgInviteMutation'; +export * from './useUpdateOrgInviteMutation'; +export * from './useDeleteOrgInviteMutation'; export * from './useCreateAppMembershipMutation'; export * from './useUpdateAppMembershipMutation'; export * from './useDeleteAppMembershipMutation'; export * from './useCreateOrgMembershipMutation'; export * from './useUpdateOrgMembershipMutation'; export * from './useDeleteOrgMembershipMutation'; -export * from './useCreateOrgInviteMutation'; -export * from './useUpdateOrgInviteMutation'; -export * from './useDeleteOrgInviteMutation'; export * from './useSubmitAppInviteCodeMutation'; export * from './useSubmitOrgInviteCodeMutation'; export * from './useRequestUploadUrlMutation'; diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgMemberProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgMemberProfileMutation.ts new file mode 100644 index 000000000..90480b1cc --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useCreateOrgMemberProfileMutation.ts @@ -0,0 +1,91 @@ +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { orgMemberProfileKeys } from '../query-keys'; +import { orgMemberProfileMutationKeys } from '../mutation-keys'; +import type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + CreateOrgMemberProfileInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + CreateOrgMemberProfileInput, +} from '../../orm/input-types'; +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgMemberProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgMemberProfileMutation( + params: { + selection: { + fields: S & OrgMemberProfileSelect; + } & HookStrictSelect, OrgMemberProfileSelect>; + } & Omit< + UseMutationOptions< + { + createOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }, + Error, + CreateOrgMemberProfileInput['orgMemberProfile'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }, + Error, + CreateOrgMemberProfileInput['orgMemberProfile'] +>; +export function useCreateOrgMemberProfileMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgMemberProfileMutationKeys.create(), + mutationFn: (data: CreateOrgMemberProfileInput['orgMemberProfile']) => + getClient() + .orgMemberProfile.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useDeleteConnectedAccountMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgMemberProfileMutation.ts similarity index 55% rename from sdk/constructive-react/src/public/hooks/mutations/useDeleteConnectedAccountMutation.ts rename to sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgMemberProfileMutation.ts index baf933521..ce00294d4 100644 --- a/sdk/constructive-react/src/public/hooks/mutations/useDeleteConnectedAccountMutation.ts +++ b/sdk/constructive-react/src/admin/hooks/mutations/useDeleteOrgMemberProfileMutation.ts @@ -1,5 +1,5 @@ /** - * OAuth and social login connections linking external service accounts to users + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,33 +9,33 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { connectedAccountKeys } from '../query-keys'; -import { connectedAccountMutationKeys } from '../mutation-keys'; -import type { ConnectedAccountSelect, ConnectedAccountWithRelations } from '../../orm/input-types'; +import { orgMemberProfileKeys } from '../query-keys'; +import { orgMemberProfileMutationKeys } from '../mutation-keys'; +import type { OrgMemberProfileSelect, OrgMemberProfileWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ConnectedAccountSelect, ConnectedAccountWithRelations } from '../../orm/input-types'; +export type { OrgMemberProfileSelect, OrgMemberProfileWithRelations } from '../../orm/input-types'; /** - * OAuth and social login connections linking external service accounts to users + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) * * @example * ```tsx - * const { mutate, isPending } = useDeleteConnectedAccountMutation({ + * const { mutate, isPending } = useDeleteOrgMemberProfileMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteConnectedAccountMutation( +export function useDeleteOrgMemberProfileMutation( params: { selection: { - fields: S & ConnectedAccountSelect; - } & HookStrictSelect, ConnectedAccountSelect>; + fields: S & OrgMemberProfileSelect; + } & HookStrictSelect, OrgMemberProfileSelect>; } & Omit< UseMutationOptions< { - deleteConnectedAccount: { - connectedAccount: InferSelectResult; + deleteOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }, Error, @@ -47,8 +47,8 @@ export function useDeleteConnectedAccountMutation ): UseMutationResult< { - deleteConnectedAccount: { - connectedAccount: InferSelectResult; + deleteOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }, Error, @@ -56,9 +56,9 @@ export function useDeleteConnectedAccountMutation; -export function useDeleteConnectedAccountMutation( +export function useDeleteOrgMemberProfileMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -70,15 +70,15 @@ export function useDeleteConnectedAccountMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: connectedAccountMutationKeys.all, + mutationKey: orgMemberProfileMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .connectedAccount.delete({ + .orgMemberProfile.delete({ where: { id, }, @@ -87,10 +87,10 @@ export function useDeleteConnectedAccountMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: connectedAccountKeys.detail(variables.id), + queryKey: orgMemberProfileKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.lists(), + queryKey: orgMemberProfileKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgMemberProfileMutation.ts b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgMemberProfileMutation.ts new file mode 100644 index 000000000..2dcb8b95c --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/mutations/useUpdateOrgMemberProfileMutation.ts @@ -0,0 +1,116 @@ +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { orgMemberProfileKeys } from '../query-keys'; +import { orgMemberProfileMutationKeys } from '../mutation-keys'; +import type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + OrgMemberProfilePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + OrgMemberProfilePatch, +} from '../../orm/input-types'; +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgMemberProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgMemberProfilePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgMemberProfileMutation( + params: { + selection: { + fields: S & OrgMemberProfileSelect; + } & HookStrictSelect, OrgMemberProfileSelect>; + } & Omit< + UseMutationOptions< + { + updateOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; + } +>; +export function useUpdateOrgMemberProfileMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgMemberProfileMutationKeys.all, + mutationFn: ({ + id, + orgMemberProfilePatch, + }: { + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; + }) => + getClient() + .orgMemberProfile.update({ + where: { + id, + }, + data: orgMemberProfilePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/index.ts b/sdk/constructive-react/src/admin/hooks/queries/index.ts index bbcf1abe0..4f5e8f506 100644 --- a/sdk/constructive-react/src/admin/hooks/queries/index.ts +++ b/sdk/constructive-react/src/admin/hooks/queries/index.ts @@ -29,8 +29,6 @@ export * from './useOrgAdminGrantsQuery'; export * from './useOrgAdminGrantQuery'; export * from './useOrgOwnerGrantsQuery'; export * from './useOrgOwnerGrantQuery'; -export * from './useMembershipTypesQuery'; -export * from './useMembershipTypeQuery'; export * from './useAppLimitsQuery'; export * from './useAppLimitQuery'; export * from './useAppAchievementsQuery'; @@ -43,6 +41,8 @@ export * from './useOrgChartEdgeGrantsQuery'; export * from './useOrgChartEdgeGrantQuery'; export * from './useOrgLimitsQuery'; export * from './useOrgLimitQuery'; +export * from './useMembershipTypesQuery'; +export * from './useMembershipTypeQuery'; export * from './useAppGrantsQuery'; export * from './useAppGrantQuery'; export * from './useAppMembershipDefaultsQuery'; @@ -55,16 +55,18 @@ export * from './useOrgChartEdgesQuery'; export * from './useOrgChartEdgeQuery'; export * from './useOrgMembershipDefaultsQuery'; export * from './useOrgMembershipDefaultQuery'; +export * from './useOrgMemberProfilesQuery'; +export * from './useOrgMemberProfileQuery'; export * from './useAppLevelsQuery'; export * from './useAppLevelQuery'; export * from './useAppInvitesQuery'; export * from './useAppInviteQuery'; +export * from './useOrgInvitesQuery'; +export * from './useOrgInviteQuery'; export * from './useAppMembershipsQuery'; export * from './useAppMembershipQuery'; export * from './useOrgMembershipsQuery'; export * from './useOrgMembershipQuery'; -export * from './useOrgInvitesQuery'; -export * from './useOrgInviteQuery'; export * from './useAppPermissionsGetPaddedMaskQuery'; export * from './useOrgPermissionsGetPaddedMaskQuery'; export * from './useOrgIsManagerOfQuery'; diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberProfileQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberProfileQuery.ts new file mode 100644 index 000000000..6ad525e09 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberProfileQuery.ts @@ -0,0 +1,138 @@ +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { orgMemberProfileKeys } from '../query-keys'; +import type { OrgMemberProfileSelect, OrgMemberProfileWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { OrgMemberProfileSelect, OrgMemberProfileWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgMemberProfileQueryKey = orgMemberProfileKeys.detail; +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```tsx + * const { data, isLoading } = useOrgMemberProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgMemberProfileQuery< + S extends OrgMemberProfileSelect, + TData = { + orgMemberProfile: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgMemberProfileSelect>; + } & Omit< + UseQueryOptions< + { + orgMemberProfile: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgMemberProfileQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgMemberProfileKeys.detail(params.id), + queryFn: () => + getClient() + .orgMemberProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```ts + * const data = await fetchOrgMemberProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgMemberProfileQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgMemberProfileSelect>; +}): Promise<{ + orgMemberProfile: InferSelectResult | null; +}>; +export async function fetchOrgMemberProfileQuery(params: { + id: string; + selection: SelectionConfig; +}) { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgMemberProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```ts + * await prefetchOrgMemberProfileQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgMemberProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgMemberProfileSelect>; + } +): Promise; +export async function prefetchOrgMemberProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgMemberProfileKeys.detail(params.id), + queryFn: () => + getClient() + .orgMemberProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberProfilesQuery.ts b/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberProfilesQuery.ts new file mode 100644 index 000000000..4aa4c8d07 --- /dev/null +++ b/sdk/constructive-react/src/admin/hooks/queries/useOrgMemberProfilesQuery.ts @@ -0,0 +1,163 @@ +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { orgMemberProfileKeys } from '../query-keys'; +import type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgMemberProfilesQueryKey = orgMemberProfileKeys.list; +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```tsx + * const { data, isLoading } = useOrgMemberProfilesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgMemberProfilesQuery< + S extends OrgMemberProfileSelect, + TData = { + orgMemberProfiles: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgMemberProfileSelect>; + } & Omit< + UseQueryOptions< + { + orgMemberProfiles: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgMemberProfilesQuery( + params: { + selection: ListSelectionConfig< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgMemberProfileKeys.list(args), + queryFn: () => getClient().orgMemberProfile.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```ts + * const data = await fetchOrgMemberProfilesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgMemberProfilesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgMemberProfileSelect>; +}): Promise<{ + orgMemberProfiles: ConnectionResult>; +}>; +export async function fetchOrgMemberProfilesQuery(params: { + selection: ListSelectionConfig< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >; +}) { + const args = buildListSelectionArgs< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >(params.selection); + return getClient().orgMemberProfile.findMany(args).unwrap(); +} +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```ts + * await prefetchOrgMemberProfilesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgMemberProfilesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgMemberProfileSelect>; + } +): Promise; +export async function prefetchOrgMemberProfilesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgMemberProfileKeys.list(args), + queryFn: () => getClient().orgMemberProfile.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/admin/hooks/query-keys.ts b/sdk/constructive-react/src/admin/hooks/query-keys.ts index 45af02360..99529d898 100644 --- a/sdk/constructive-react/src/admin/hooks/query-keys.ts +++ b/sdk/constructive-react/src/admin/hooks/query-keys.ts @@ -145,15 +145,6 @@ export const orgOwnerGrantKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgOwnerGrantKeys.details(), id] as const, } as const; -export const membershipTypeKeys = { - /** All membershipType queries */ all: ['membershiptype'] as const, - /** List query keys */ lists: () => [...membershipTypeKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...membershipTypeKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...membershipTypeKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...membershipTypeKeys.details(), id] as const, -} as const; export const appLimitKeys = { /** All appLimit queries */ all: ['applimit'] as const, /** List query keys */ lists: () => [...appLimitKeys.all, 'list'] as const, @@ -208,6 +199,15 @@ export const orgLimitKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgLimitKeys.details(), id] as const, } as const; +export const membershipTypeKeys = { + /** All membershipType queries */ all: ['membershiptype'] as const, + /** List query keys */ lists: () => [...membershipTypeKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...membershipTypeKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...membershipTypeKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...membershipTypeKeys.details(), id] as const, +} as const; export const appGrantKeys = { /** All appGrant queries */ all: ['appgrant'] as const, /** List query keys */ lists: () => [...appGrantKeys.all, 'list'] as const, @@ -262,6 +262,15 @@ export const orgMembershipDefaultKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgMembershipDefaultKeys.details(), id] as const, } as const; +export const orgMemberProfileKeys = { + /** All orgMemberProfile queries */ all: ['orgmemberprofile'] as const, + /** List query keys */ lists: () => [...orgMemberProfileKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...orgMemberProfileKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgMemberProfileKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...orgMemberProfileKeys.details(), id] as const, +} as const; export const appLevelKeys = { /** All appLevel queries */ all: ['applevel'] as const, /** List query keys */ lists: () => [...appLevelKeys.all, 'list'] as const, @@ -280,6 +289,15 @@ export const appInviteKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...appInviteKeys.details(), id] as const, } as const; +export const orgInviteKeys = { + /** All orgInvite queries */ all: ['orginvite'] as const, + /** List query keys */ lists: () => [...orgInviteKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...orgInviteKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgInviteKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...orgInviteKeys.details(), id] as const, +} as const; export const appMembershipKeys = { /** All appMembership queries */ all: ['appmembership'] as const, /** List query keys */ lists: () => [...appMembershipKeys.all, 'list'] as const, @@ -298,15 +316,6 @@ export const orgMembershipKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgMembershipKeys.details(), id] as const, } as const; -export const orgInviteKeys = { - /** All orgInvite queries */ all: ['orginvite'] as const, - /** List query keys */ lists: () => [...orgInviteKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...orgInviteKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...orgInviteKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...orgInviteKeys.details(), id] as const, -} as const; // ============================================================================ // Custom Query Keys @@ -377,24 +386,25 @@ export const queryKeys = { orgLimitDefault: orgLimitDefaultKeys, orgAdminGrant: orgAdminGrantKeys, orgOwnerGrant: orgOwnerGrantKeys, - membershipType: membershipTypeKeys, appLimit: appLimitKeys, appAchievement: appAchievementKeys, appStep: appStepKeys, appClaimedInvite: appClaimedInviteKeys, orgChartEdgeGrant: orgChartEdgeGrantKeys, orgLimit: orgLimitKeys, + membershipType: membershipTypeKeys, appGrant: appGrantKeys, appMembershipDefault: appMembershipDefaultKeys, orgClaimedInvite: orgClaimedInviteKeys, orgGrant: orgGrantKeys, orgChartEdge: orgChartEdgeKeys, orgMembershipDefault: orgMembershipDefaultKeys, + orgMemberProfile: orgMemberProfileKeys, appLevel: appLevelKeys, appInvite: appInviteKeys, + orgInvite: orgInviteKeys, appMembership: appMembershipKeys, orgMembership: orgMembershipKeys, - orgInvite: orgInviteKeys, custom: customQueryKeys, } as const; /** Type representing all available query key scopes */ diff --git a/sdk/constructive-react/src/admin/orm/README.md b/sdk/constructive-react/src/admin/orm/README.md index bb7c574ae..6d694a7cf 100644 --- a/sdk/constructive-react/src/admin/orm/README.md +++ b/sdk/constructive-react/src/admin/orm/README.md @@ -35,24 +35,25 @@ const db = createClient({ | `orgLimitDefault` | findMany, findOne, create, update, delete | | `orgAdminGrant` | findMany, findOne, create, update, delete | | `orgOwnerGrant` | findMany, findOne, create, update, delete | -| `membershipType` | findMany, findOne, create, update, delete | | `appLimit` | findMany, findOne, create, update, delete | | `appAchievement` | findMany, findOne, create, update, delete | | `appStep` | findMany, findOne, create, update, delete | | `appClaimedInvite` | findMany, findOne, create, update, delete | | `orgChartEdgeGrant` | findMany, findOne, create, update, delete | | `orgLimit` | findMany, findOne, create, update, delete | +| `membershipType` | findMany, findOne, create, update, delete | | `appGrant` | findMany, findOne, create, update, delete | | `appMembershipDefault` | findMany, findOne, create, update, delete | | `orgClaimedInvite` | findMany, findOne, create, update, delete | | `orgGrant` | findMany, findOne, create, update, delete | | `orgChartEdge` | findMany, findOne, create, update, delete | | `orgMembershipDefault` | findMany, findOne, create, update, delete | +| `orgMemberProfile` | findMany, findOne, create, update, delete | | `appLevel` | findMany, findOne, create, update, delete | | `appInvite` | findMany, findOne, create, update, delete | +| `orgInvite` | findMany, findOne, create, update, delete | | `appMembership` | findMany, findOne, create, update, delete | | `orgMembership` | findMany, findOne, create, update, delete | -| `orgInvite` | findMany, findOne, create, update, delete | ## Table Operations @@ -511,38 +512,6 @@ const updated = await db.orgOwnerGrant.update({ where: { id: '' }, data: { const deleted = await db.orgOwnerGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.membershipType` - -CRUD operations for MembershipType records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | Int | No | -| `name` | String | Yes | -| `description` | String | Yes | -| `prefix` | String | Yes | - -**Operations:** - -```typescript -// List all membershipType records -const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true } }).execute(); - -// Get one by id -const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true } }).execute(); - -// Create -const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); -``` - ### `db.appLimit` CRUD operations for AppLimit records. @@ -749,6 +718,40 @@ const updated = await db.orgLimit.update({ where: { id: '' }, data: { name const deleted = await db.orgLimit.delete({ where: { id: '' } }).execute(); ``` +### `db.membershipType` + +CRUD operations for MembershipType records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | Int | No | +| `name` | String | Yes | +| `description` | String | Yes | +| `prefix` | String | Yes | +| `parentMembershipType` | Int | Yes | +| `hasUsersTableEntry` | Boolean | Yes | + +**Operations:** + +```typescript +// List all membershipType records +const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Get one by id +const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Create +const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); +``` + ### `db.appGrant` CRUD operations for AppGrant records. @@ -963,6 +966,45 @@ const updated = await db.orgMembershipDefault.update({ where: { id: '' }, const deleted = await db.orgMembershipDefault.delete({ where: { id: '' } }).execute(); ``` +### `db.orgMemberProfile` + +CRUD operations for OrgMemberProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `membershipId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `actorId` | UUID | Yes | +| `displayName` | String | Yes | +| `email` | String | Yes | +| `title` | String | Yes | +| `bio` | String | Yes | +| `profilePicture` | ConstructiveInternalTypeImage | Yes | + +**Operations:** + +```typescript +// List all orgMemberProfile records +const items = await db.orgMemberProfile.findMany({ select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Get one by id +const item = await db.orgMemberProfile.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Create +const created = await db.orgMemberProfile.create({ data: { membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgMemberProfile.update({ where: { id: '' }, data: { membershipId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgMemberProfile.delete({ where: { id: '' } }).execute(); +``` + ### `db.appLevel` CRUD operations for AppLevel records. @@ -1038,53 +1080,51 @@ const updated = await db.appInvite.update({ where: { id: '' }, data: { ema const deleted = await db.appInvite.delete({ where: { id: '' } }).execute(); ``` -### `db.appMembership` +### `db.orgInvite` -CRUD operations for AppMembership records. +CRUD operations for OrgInvite records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | +| `email` | ConstructiveInternalTypeEmail | Yes | +| `senderId` | UUID | Yes | +| `receiverId` | UUID | Yes | +| `inviteToken` | String | Yes | +| `inviteValid` | Boolean | Yes | +| `inviteLimit` | Int | Yes | +| `inviteCount` | Int | Yes | +| `multiple` | Boolean | Yes | +| `data` | JSON | Yes | +| `expiresAt` | Datetime | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | -| `createdBy` | UUID | Yes | -| `updatedBy` | UUID | Yes | -| `isApproved` | Boolean | Yes | -| `isBanned` | Boolean | Yes | -| `isDisabled` | Boolean | Yes | -| `isVerified` | Boolean | Yes | -| `isActive` | Boolean | Yes | -| `isOwner` | Boolean | Yes | -| `isAdmin` | Boolean | Yes | -| `permissions` | BitString | Yes | -| `granted` | BitString | Yes | -| `actorId` | UUID | Yes | -| `profileId` | UUID | Yes | +| `entityId` | UUID | Yes | **Operations:** ```typescript -// List all appMembership records -const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +// List all orgInvite records +const items = await db.orgInvite.findMany({ select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); // Get one by id -const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +const item = await db.orgInvite.findOne({ id: '', select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); // Create -const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.orgInvite.create({ data: { email: '', senderId: '', receiverId: '', inviteToken: '', inviteValid: '', inviteLimit: '', inviteCount: '', multiple: '', data: '', expiresAt: '', entityId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); +const updated = await db.orgInvite.update({ where: { id: '' }, data: { email: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appMembership.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgInvite.delete({ where: { id: '' } }).execute(); ``` -### `db.orgMembership` +### `db.appMembership` -CRUD operations for OrgMembership records. +CRUD operations for AppMembership records. **Fields:** @@ -1098,74 +1138,79 @@ CRUD operations for OrgMembership records. | `isApproved` | Boolean | Yes | | `isBanned` | Boolean | Yes | | `isDisabled` | Boolean | Yes | +| `isVerified` | Boolean | Yes | | `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isAdmin` | Boolean | Yes | | `permissions` | BitString | Yes | | `granted` | BitString | Yes | | `actorId` | UUID | Yes | -| `entityId` | UUID | Yes | | `profileId` | UUID | Yes | **Operations:** ```typescript -// List all orgMembership records -const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +// List all appMembership records +const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Get one by id -const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Create -const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); +const updated = await db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgMembership.delete({ where: { id: '' } }).execute(); +const deleted = await db.appMembership.delete({ where: { id: '' } }).execute(); ``` -### `db.orgInvite` +### `db.orgMembership` -CRUD operations for OrgInvite records. +CRUD operations for OrgMembership records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | -| `email` | ConstructiveInternalTypeEmail | Yes | -| `senderId` | UUID | Yes | -| `receiverId` | UUID | Yes | -| `inviteToken` | String | Yes | -| `inviteValid` | Boolean | Yes | -| `inviteLimit` | Int | Yes | -| `inviteCount` | Int | Yes | -| `multiple` | Boolean | Yes | -| `data` | JSON | Yes | -| `expiresAt` | Datetime | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `updatedBy` | UUID | Yes | +| `isApproved` | Boolean | Yes | +| `isBanned` | Boolean | Yes | +| `isDisabled` | Boolean | Yes | +| `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | +| `isOwner` | Boolean | Yes | +| `isAdmin` | Boolean | Yes | +| `permissions` | BitString | Yes | +| `granted` | BitString | Yes | +| `actorId` | UUID | Yes | | `entityId` | UUID | Yes | +| `isReadOnly` | Boolean | Yes | +| `profileId` | UUID | Yes | **Operations:** ```typescript -// List all orgInvite records -const items = await db.orgInvite.findMany({ select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); +// List all orgMembership records +const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Get one by id -const item = await db.orgInvite.findOne({ id: '', select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); +const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Create -const created = await db.orgInvite.create({ data: { email: '', senderId: '', receiverId: '', inviteToken: '', inviteValid: '', inviteLimit: '', inviteCount: '', multiple: '', data: '', expiresAt: '', entityId: '' }, select: { id: true } }).execute(); +const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgInvite.update({ where: { id: '' }, data: { email: '' }, select: { id: true } }).execute(); +const updated = await db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgInvite.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgMembership.delete({ where: { id: '' } }).execute(); ``` ## Custom Operations diff --git a/sdk/constructive-react/src/admin/orm/index.ts b/sdk/constructive-react/src/admin/orm/index.ts index becae9d2a..9c5a64e61 100644 --- a/sdk/constructive-react/src/admin/orm/index.ts +++ b/sdk/constructive-react/src/admin/orm/index.ts @@ -19,24 +19,25 @@ import { AppLimitDefaultModel } from './models/appLimitDefault'; import { OrgLimitDefaultModel } from './models/orgLimitDefault'; import { OrgAdminGrantModel } from './models/orgAdminGrant'; import { OrgOwnerGrantModel } from './models/orgOwnerGrant'; -import { MembershipTypeModel } from './models/membershipType'; import { AppLimitModel } from './models/appLimit'; import { AppAchievementModel } from './models/appAchievement'; import { AppStepModel } from './models/appStep'; import { AppClaimedInviteModel } from './models/appClaimedInvite'; import { OrgChartEdgeGrantModel } from './models/orgChartEdgeGrant'; import { OrgLimitModel } from './models/orgLimit'; +import { MembershipTypeModel } from './models/membershipType'; import { AppGrantModel } from './models/appGrant'; import { AppMembershipDefaultModel } from './models/appMembershipDefault'; import { OrgClaimedInviteModel } from './models/orgClaimedInvite'; import { OrgGrantModel } from './models/orgGrant'; import { OrgChartEdgeModel } from './models/orgChartEdge'; import { OrgMembershipDefaultModel } from './models/orgMembershipDefault'; +import { OrgMemberProfileModel } from './models/orgMemberProfile'; import { AppLevelModel } from './models/appLevel'; import { AppInviteModel } from './models/appInvite'; +import { OrgInviteModel } from './models/orgInvite'; import { AppMembershipModel } from './models/appMembership'; import { OrgMembershipModel } from './models/orgMembership'; -import { OrgInviteModel } from './models/orgInvite'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; @@ -86,24 +87,25 @@ export function createClient(config: OrmClientConfig) { orgLimitDefault: new OrgLimitDefaultModel(client), orgAdminGrant: new OrgAdminGrantModel(client), orgOwnerGrant: new OrgOwnerGrantModel(client), - membershipType: new MembershipTypeModel(client), appLimit: new AppLimitModel(client), appAchievement: new AppAchievementModel(client), appStep: new AppStepModel(client), appClaimedInvite: new AppClaimedInviteModel(client), orgChartEdgeGrant: new OrgChartEdgeGrantModel(client), orgLimit: new OrgLimitModel(client), + membershipType: new MembershipTypeModel(client), appGrant: new AppGrantModel(client), appMembershipDefault: new AppMembershipDefaultModel(client), orgClaimedInvite: new OrgClaimedInviteModel(client), orgGrant: new OrgGrantModel(client), orgChartEdge: new OrgChartEdgeModel(client), orgMembershipDefault: new OrgMembershipDefaultModel(client), + orgMemberProfile: new OrgMemberProfileModel(client), appLevel: new AppLevelModel(client), appInvite: new AppInviteModel(client), + orgInvite: new OrgInviteModel(client), appMembership: new AppMembershipModel(client), orgMembership: new OrgMembershipModel(client), - orgInvite: new OrgInviteModel(client), query: createQueryOperations(client), mutation: createMutationOperations(client), }; diff --git a/sdk/constructive-react/src/admin/orm/input-types.ts b/sdk/constructive-react/src/admin/orm/input-types.ts index 66dd2861c..e65a723bc 100644 --- a/sdk/constructive-react/src/admin/orm/input-types.ts +++ b/sdk/constructive-react/src/admin/orm/input-types.ts @@ -370,17 +370,6 @@ export interface OrgOwnerGrant { createdAt?: string | null; updatedAt?: string | null; } -/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ -export interface MembershipType { - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; - /** Human-readable name of the membership type */ - name?: string | null; - /** Description of what this membership type represents */ - description?: string | null; - /** Short prefix used to namespace tables and functions for this membership scope */ - prefix?: string | null; -} /** Tracks per-actor usage counts against configurable maximum limits */ export interface AppLimit { id: string; @@ -460,6 +449,21 @@ export interface OrgLimit { max?: number | null; entityId?: string | null; } +/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ +export interface MembershipType { + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; + /** Human-readable name of the membership type */ + name?: string | null; + /** Description of what this membership type represents */ + description?: string | null; + /** Short prefix used to namespace tables and functions for this membership scope */ + prefix?: string | null; + /** Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) */ + parentMembershipType?: number | null; + /** When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs */ + hasUsersTableEntry?: boolean | null; +} /** Records of individual permission grants and revocations for members via bitmask */ export interface AppGrant { id: string; @@ -545,6 +549,28 @@ export interface OrgMembershipDefault { /** When a group is created, whether to auto-add existing org members as group members */ createGroupsCascadeMembers?: boolean | null; } +/** Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) */ +export interface OrgMemberProfile { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** References the membership this profile belongs to (1:1) */ + membershipId?: string | null; + /** References the entity this profile belongs to (used for RLS lookups) */ + entityId?: string | null; + /** References the user who owns this profile (for self-edit RLS) */ + actorId?: string | null; + /** Display name shown to other entity members */ + displayName?: string | null; + /** Email address visible to other entity members (auto-populated from verified primary email) */ + email?: string | null; + /** Job title or role description visible to other entity members */ + title?: string | null; + /** Short biography visible to other entity members */ + bio?: string | null; + /** Profile picture visible to other entity members */ + profilePicture?: ConstructiveInternalTypeImage | null; +} /** Defines available levels that users can achieve by completing requirements */ export interface AppLevel { id: string; @@ -583,6 +609,33 @@ export interface AppInvite { createdAt?: string | null; updatedAt?: string | null; } +/** Invitation records sent to prospective members via email, with token-based redemption and expiration */ +export interface OrgInvite { + id: string; + /** Email address of the invited recipient */ + email?: ConstructiveInternalTypeEmail | null; + /** User ID of the member who sent this invitation */ + senderId?: string | null; + /** User ID of the intended recipient, if targeting a specific user */ + receiverId?: string | null; + /** Unique random hex token used to redeem this invitation */ + inviteToken?: string | null; + /** Whether this invitation is still valid and can be redeemed */ + inviteValid?: boolean | null; + /** Maximum number of times this invite can be claimed; -1 means unlimited */ + inviteLimit?: number | null; + /** Running count of how many times this invite has been claimed */ + inviteCount?: number | null; + /** Whether this invite can be claimed by multiple recipients */ + multiple?: boolean | null; + /** Optional JSON payload of additional invite metadata */ + data?: Record | null; + /** Timestamp after which this invitation can no longer be redeemed */ + expiresAt?: string | null; + createdAt?: string | null; + updatedAt?: string | null; + entityId?: string | null; +} /** Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status */ export interface AppMembership { id: string; @@ -600,6 +653,8 @@ export interface AppMembership { isVerified?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -627,6 +682,8 @@ export interface OrgMembership { isDisabled?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -639,35 +696,10 @@ export interface OrgMembership { actorId?: string | null; /** References the entity (org or group) this membership belongs to */ entityId?: string | null; + /** Whether this member has read-only access (blocks mutations when true) */ + isReadOnly?: boolean | null; profileId?: string | null; } -/** Invitation records sent to prospective members via email, with token-based redemption and expiration */ -export interface OrgInvite { - id: string; - /** Email address of the invited recipient */ - email?: ConstructiveInternalTypeEmail | null; - /** User ID of the member who sent this invitation */ - senderId?: string | null; - /** User ID of the intended recipient, if targeting a specific user */ - receiverId?: string | null; - /** Unique random hex token used to redeem this invitation */ - inviteToken?: string | null; - /** Whether this invitation is still valid and can be redeemed */ - inviteValid?: boolean | null; - /** Maximum number of times this invite can be claimed; -1 means unlimited */ - inviteLimit?: number | null; - /** Running count of how many times this invite has been claimed */ - inviteCount?: number | null; - /** Whether this invite can be claimed by multiple recipients */ - multiple?: boolean | null; - /** Optional JSON payload of additional invite metadata */ - data?: Record | null; - /** Timestamp after which this invitation can no longer be redeemed */ - expiresAt?: string | null; - createdAt?: string | null; - updatedAt?: string | null; - entityId?: string | null; -} // ============ Relation Helper Types ============ export interface ConnectionResult { nodes: T[]; @@ -695,24 +727,29 @@ export interface AppLimitDefaultRelations {} export interface OrgLimitDefaultRelations {} export interface OrgAdminGrantRelations {} export interface OrgOwnerGrantRelations {} -export interface MembershipTypeRelations {} export interface AppLimitRelations {} export interface AppAchievementRelations {} export interface AppStepRelations {} export interface AppClaimedInviteRelations {} export interface OrgChartEdgeGrantRelations {} export interface OrgLimitRelations {} +export interface MembershipTypeRelations {} export interface AppGrantRelations {} export interface AppMembershipDefaultRelations {} export interface OrgClaimedInviteRelations {} export interface OrgGrantRelations {} export interface OrgChartEdgeRelations {} export interface OrgMembershipDefaultRelations {} +export interface OrgMemberProfileRelations { + membership?: OrgMembership | null; +} export interface AppLevelRelations {} export interface AppInviteRelations {} -export interface AppMembershipRelations {} -export interface OrgMembershipRelations {} export interface OrgInviteRelations {} +export interface AppMembershipRelations {} +export interface OrgMembershipRelations { + orgMemberProfileByMembershipId?: OrgMemberProfile | null; +} // ============ Entity Types With Relations ============ export type OrgGetManagersRecordWithRelations = OrgGetManagersRecord & OrgGetManagersRecordRelations; @@ -732,13 +769,13 @@ export type AppLimitDefaultWithRelations = AppLimitDefault & AppLimitDefaultRela export type OrgLimitDefaultWithRelations = OrgLimitDefault & OrgLimitDefaultRelations; export type OrgAdminGrantWithRelations = OrgAdminGrant & OrgAdminGrantRelations; export type OrgOwnerGrantWithRelations = OrgOwnerGrant & OrgOwnerGrantRelations; -export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type AppLimitWithRelations = AppLimit & AppLimitRelations; export type AppAchievementWithRelations = AppAchievement & AppAchievementRelations; export type AppStepWithRelations = AppStep & AppStepRelations; export type AppClaimedInviteWithRelations = AppClaimedInvite & AppClaimedInviteRelations; export type OrgChartEdgeGrantWithRelations = OrgChartEdgeGrant & OrgChartEdgeGrantRelations; export type OrgLimitWithRelations = OrgLimit & OrgLimitRelations; +export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type AppGrantWithRelations = AppGrant & AppGrantRelations; export type AppMembershipDefaultWithRelations = AppMembershipDefault & AppMembershipDefaultRelations; @@ -747,11 +784,12 @@ export type OrgGrantWithRelations = OrgGrant & OrgGrantRelations; export type OrgChartEdgeWithRelations = OrgChartEdge & OrgChartEdgeRelations; export type OrgMembershipDefaultWithRelations = OrgMembershipDefault & OrgMembershipDefaultRelations; +export type OrgMemberProfileWithRelations = OrgMemberProfile & OrgMemberProfileRelations; export type AppLevelWithRelations = AppLevel & AppLevelRelations; export type AppInviteWithRelations = AppInvite & AppInviteRelations; +export type OrgInviteWithRelations = OrgInvite & OrgInviteRelations; export type AppMembershipWithRelations = AppMembership & AppMembershipRelations; export type OrgMembershipWithRelations = OrgMembership & OrgMembershipRelations; -export type OrgInviteWithRelations = OrgInvite & OrgInviteRelations; // ============ Entity Select Types ============ export type OrgGetManagersRecordSelect = { userId?: boolean; @@ -844,12 +882,6 @@ export type OrgOwnerGrantSelect = { createdAt?: boolean; updatedAt?: boolean; }; -export type MembershipTypeSelect = { - id?: boolean; - name?: boolean; - description?: boolean; - prefix?: boolean; -}; export type AppLimitSelect = { id?: boolean; name?: boolean; @@ -900,6 +932,14 @@ export type OrgLimitSelect = { max?: boolean; entityId?: boolean; }; +export type MembershipTypeSelect = { + id?: boolean; + name?: boolean; + description?: boolean; + prefix?: boolean; + parentMembershipType?: boolean; + hasUsersTableEntry?: boolean; +}; export type AppGrantSelect = { id?: boolean; permissions?: boolean; @@ -958,6 +998,22 @@ export type OrgMembershipDefaultSelect = { deleteMemberCascadeGroups?: boolean; createGroupsCascadeMembers?: boolean; }; +export type OrgMemberProfileSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + membershipId?: boolean; + entityId?: boolean; + actorId?: boolean; + displayName?: boolean; + email?: boolean; + title?: boolean; + bio?: boolean; + profilePicture?: boolean; + membership?: { + select: OrgMembershipSelect; + }; +}; export type AppLevelSelect = { id?: boolean; name?: boolean; @@ -981,6 +1037,22 @@ export type AppInviteSelect = { createdAt?: boolean; updatedAt?: boolean; }; +export type OrgInviteSelect = { + id?: boolean; + email?: boolean; + senderId?: boolean; + receiverId?: boolean; + inviteToken?: boolean; + inviteValid?: boolean; + inviteLimit?: boolean; + inviteCount?: boolean; + multiple?: boolean; + data?: boolean; + expiresAt?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + entityId?: boolean; +}; export type AppMembershipSelect = { id?: boolean; createdAt?: boolean; @@ -992,6 +1064,7 @@ export type AppMembershipSelect = { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; @@ -1009,29 +1082,18 @@ export type OrgMembershipSelect = { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; granted?: boolean; actorId?: boolean; entityId?: boolean; + isReadOnly?: boolean; profileId?: boolean; -}; -export type OrgInviteSelect = { - id?: boolean; - email?: boolean; - senderId?: boolean; - receiverId?: boolean; - inviteToken?: boolean; - inviteValid?: boolean; - inviteLimit?: boolean; - inviteCount?: boolean; - multiple?: boolean; - data?: boolean; - expiresAt?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - entityId?: boolean; + orgMemberProfileByMembershipId?: { + select: OrgMemberProfileSelect; + }; }; // ============ Table Filter Types ============ export interface OrgGetManagersRecordFilter { @@ -1262,22 +1324,6 @@ export interface OrgOwnerGrantFilter { /** Negates the expression. */ not?: OrgOwnerGrantFilter; } -export interface MembershipTypeFilter { - /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Checks for all expressions in this list. */ - and?: MembershipTypeFilter[]; - /** Checks for any expressions in this list. */ - or?: MembershipTypeFilter[]; - /** Negates the expression. */ - not?: MembershipTypeFilter; -} export interface AppLimitFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1400,6 +1446,26 @@ export interface OrgLimitFilter { /** Negates the expression. */ not?: OrgLimitFilter; } +export interface MembershipTypeFilter { + /** Filter by the object’s `id` field. */ + id?: IntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `parentMembershipType` field. */ + parentMembershipType?: IntFilter; + /** Filter by the object’s `hasUsersTableEntry` field. */ + hasUsersTableEntry?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: MembershipTypeFilter[]; + /** Checks for any expressions in this list. */ + or?: MembershipTypeFilter[]; + /** Negates the expression. */ + not?: MembershipTypeFilter; +} export interface AppGrantFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1538,6 +1604,38 @@ export interface OrgMembershipDefaultFilter { /** Negates the expression. */ not?: OrgMembershipDefaultFilter; } +export interface OrgMemberProfileFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; +} export interface AppLevelFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1590,6 +1688,40 @@ export interface AppInviteFilter { /** Negates the expression. */ not?: AppInviteFilter; } +export interface OrgInviteFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `email` field. */ + email?: ConstructiveInternalTypeEmailFilter; + /** Filter by the object’s `senderId` field. */ + senderId?: UUIDFilter; + /** Filter by the object’s `receiverId` field. */ + receiverId?: UUIDFilter; + /** Filter by the object’s `inviteToken` field. */ + inviteToken?: StringFilter; + /** Filter by the object’s `inviteValid` field. */ + inviteValid?: BooleanFilter; + /** Filter by the object’s `inviteLimit` field. */ + inviteLimit?: IntFilter; + /** Filter by the object’s `inviteCount` field. */ + inviteCount?: IntFilter; + /** Filter by the object’s `multiple` field. */ + multiple?: BooleanFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgInviteFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgInviteFilter[]; + /** Negates the expression. */ + not?: OrgInviteFilter; +} export interface AppMembershipFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1611,6 +1743,8 @@ export interface AppMembershipFilter { isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -1649,6 +1783,8 @@ export interface OrgMembershipFilter { isDisabled?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -1661,6 +1797,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ @@ -1669,40 +1807,10 @@ export interface OrgMembershipFilter { or?: OrgMembershipFilter[]; /** Negates the expression. */ not?: OrgMembershipFilter; -} -export interface OrgInviteFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `email` field. */ - email?: ConstructiveInternalTypeEmailFilter; - /** Filter by the object’s `senderId` field. */ - senderId?: UUIDFilter; - /** Filter by the object’s `receiverId` field. */ - receiverId?: UUIDFilter; - /** Filter by the object’s `inviteToken` field. */ - inviteToken?: StringFilter; - /** Filter by the object’s `inviteValid` field. */ - inviteValid?: BooleanFilter; - /** Filter by the object’s `inviteLimit` field. */ - inviteLimit?: IntFilter; - /** Filter by the object’s `inviteCount` field. */ - inviteCount?: IntFilter; - /** Filter by the object’s `multiple` field. */ - multiple?: BooleanFilter; - /** Filter by the object’s `expiresAt` field. */ - expiresAt?: DatetimeFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: OrgInviteFilter[]; - /** Checks for any expressions in this list. */ - or?: OrgInviteFilter[]; - /** Negates the expression. */ - not?: OrgInviteFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; } // ============ OrderBy Types ============ export type OrgGetManagersRecordsOrderBy = @@ -1887,18 +1995,6 @@ export type OrgOwnerGrantOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type MembershipTypeOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'DESCRIPTION_ASC' - | 'DESCRIPTION_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC'; export type AppLimitOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1999,6 +2095,22 @@ export type OrgLimitOrderBy = | 'MAX_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC'; +export type MembershipTypeOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PARENT_MEMBERSHIP_TYPE_ASC' + | 'PARENT_MEMBERSHIP_TYPE_DESC' + | 'HAS_USERS_TABLE_ENTRY_ASC' + | 'HAS_USERS_TABLE_ENTRY_DESC'; export type AppGrantOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -2115,6 +2227,32 @@ export type OrgMembershipDefaultOrderBy = | 'DELETE_MEMBER_CASCADE_GROUPS_DESC' | 'CREATE_GROUPS_CASCADE_MEMBERS_ASC' | 'CREATE_GROUPS_CASCADE_MEMBERS_DESC'; +export type OrgMemberProfileOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'BIO_ASC' + | 'BIO_DESC' + | 'PROFILE_PICTURE_ASC' + | 'PROFILE_PICTURE_DESC'; export type AppLevelOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -2161,6 +2299,38 @@ export type AppInviteOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgInviteOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'SENDER_ID_ASC' + | 'SENDER_ID_DESC' + | 'RECEIVER_ID_ASC' + | 'RECEIVER_ID_DESC' + | 'INVITE_TOKEN_ASC' + | 'INVITE_TOKEN_DESC' + | 'INVITE_VALID_ASC' + | 'INVITE_VALID_DESC' + | 'INVITE_LIMIT_ASC' + | 'INVITE_LIMIT_DESC' + | 'INVITE_COUNT_ASC' + | 'INVITE_COUNT_DESC' + | 'MULTIPLE_ASC' + | 'MULTIPLE_DESC' + | 'DATA_ASC' + | 'DATA_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC'; export type AppMembershipOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -2185,6 +2355,8 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -2219,6 +2391,8 @@ export type OrgMembershipOrderBy = | 'IS_DISABLED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -2231,40 +2405,10 @@ export type OrgMembershipOrderBy = | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' | 'PROFILE_ID_ASC' | 'PROFILE_ID_DESC'; -export type OrgInviteOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'EMAIL_ASC' - | 'EMAIL_DESC' - | 'SENDER_ID_ASC' - | 'SENDER_ID_DESC' - | 'RECEIVER_ID_ASC' - | 'RECEIVER_ID_DESC' - | 'INVITE_TOKEN_ASC' - | 'INVITE_TOKEN_DESC' - | 'INVITE_VALID_ASC' - | 'INVITE_VALID_DESC' - | 'INVITE_LIMIT_ASC' - | 'INVITE_LIMIT_DESC' - | 'INVITE_COUNT_ASC' - | 'INVITE_COUNT_DESC' - | 'MULTIPLE_ASC' - | 'MULTIPLE_DESC' - | 'DATA_ASC' - | 'DATA_DESC' - | 'EXPIRES_AT_ASC' - | 'EXPIRES_AT_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC'; // ============ CRUD Input Types ============ export interface CreateOrgGetManagersRecordInput { clientMutationId?: string; @@ -2572,28 +2716,6 @@ export interface DeleteOrgOwnerGrantInput { clientMutationId?: string; id: string; } -export interface CreateMembershipTypeInput { - clientMutationId?: string; - membershipType: { - name: string; - description: string; - prefix: string; - }; -} -export interface MembershipTypePatch { - name?: string | null; - description?: string | null; - prefix?: string | null; -} -export interface UpdateMembershipTypeInput { - clientMutationId?: string; - id: number; - membershipTypePatch: MembershipTypePatch; -} -export interface DeleteMembershipTypeInput { - clientMutationId?: string; - id: number; -} export interface CreateAppLimitInput { clientMutationId?: string; appLimit: { @@ -2740,6 +2862,32 @@ export interface DeleteOrgLimitInput { clientMutationId?: string; id: string; } +export interface CreateMembershipTypeInput { + clientMutationId?: string; + membershipType: { + name: string; + description: string; + prefix: string; + parentMembershipType?: number; + hasUsersTableEntry?: boolean; + }; +} +export interface MembershipTypePatch { + name?: string | null; + description?: string | null; + prefix?: string | null; + parentMembershipType?: number | null; + hasUsersTableEntry?: boolean | null; +} +export interface UpdateMembershipTypeInput { + clientMutationId?: string; + id: number; + membershipTypePatch: MembershipTypePatch; +} +export interface DeleteMembershipTypeInput { + clientMutationId?: string; + id: number; +} export interface CreateAppGrantInput { clientMutationId?: string; appGrant: { @@ -2892,6 +3040,39 @@ export interface DeleteOrgMembershipDefaultInput { clientMutationId?: string; id: string; } +export interface CreateOrgMemberProfileInput { + clientMutationId?: string; + orgMemberProfile: { + membershipId: string; + entityId: string; + actorId: string; + displayName?: string; + email?: string; + title?: string; + bio?: string; + profilePicture?: ConstructiveInternalTypeImage; + }; +} +export interface OrgMemberProfilePatch { + membershipId?: string | null; + entityId?: string | null; + actorId?: string | null; + displayName?: string | null; + email?: string | null; + title?: string | null; + bio?: string | null; + profilePicture?: ConstructiveInternalTypeImage | null; + profilePictureUpload?: File | null; +} +export interface UpdateOrgMemberProfileInput { + clientMutationId?: string; + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; +} +export interface DeleteOrgMemberProfileInput { + clientMutationId?: string; + id: string; +} export interface CreateAppLevelInput { clientMutationId?: string; appLevel: { @@ -2951,6 +3132,44 @@ export interface DeleteAppInviteInput { clientMutationId?: string; id: string; } +export interface CreateOrgInviteInput { + clientMutationId?: string; + orgInvite: { + email?: ConstructiveInternalTypeEmail; + senderId?: string; + receiverId?: string; + inviteToken?: string; + inviteValid?: boolean; + inviteLimit?: number; + inviteCount?: number; + multiple?: boolean; + data?: Record; + expiresAt?: string; + entityId: string; + }; +} +export interface OrgInvitePatch { + email?: ConstructiveInternalTypeEmail | null; + senderId?: string | null; + receiverId?: string | null; + inviteToken?: string | null; + inviteValid?: boolean | null; + inviteLimit?: number | null; + inviteCount?: number | null; + multiple?: boolean | null; + data?: Record | null; + expiresAt?: string | null; + entityId?: string | null; +} +export interface UpdateOrgInviteInput { + clientMutationId?: string; + id: string; + orgInvitePatch: OrgInvitePatch; +} +export interface DeleteOrgInviteInput { + clientMutationId?: string; + id: string; +} export interface CreateAppMembershipInput { clientMutationId?: string; appMembership: { @@ -2961,6 +3180,7 @@ export interface CreateAppMembershipInput { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; @@ -2977,6 +3197,7 @@ export interface AppMembershipPatch { isDisabled?: boolean | null; isVerified?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; @@ -3002,12 +3223,14 @@ export interface CreateOrgMembershipInput { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; granted?: string; actorId: string; entityId: string; + isReadOnly?: boolean; profileId?: string; }; } @@ -3018,58 +3241,22 @@ export interface OrgMembershipPatch { isBanned?: boolean | null; isDisabled?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; granted?: string | null; actorId?: string | null; entityId?: string | null; + isReadOnly?: boolean | null; profileId?: string | null; } export interface UpdateOrgMembershipInput { clientMutationId?: string; id: string; - orgMembershipPatch: OrgMembershipPatch; -} -export interface DeleteOrgMembershipInput { - clientMutationId?: string; - id: string; -} -export interface CreateOrgInviteInput { - clientMutationId?: string; - orgInvite: { - email?: ConstructiveInternalTypeEmail; - senderId?: string; - receiverId?: string; - inviteToken?: string; - inviteValid?: boolean; - inviteLimit?: number; - inviteCount?: number; - multiple?: boolean; - data?: Record; - expiresAt?: string; - entityId: string; - }; -} -export interface OrgInvitePatch { - email?: ConstructiveInternalTypeEmail | null; - senderId?: string | null; - receiverId?: string | null; - inviteToken?: string | null; - inviteValid?: boolean | null; - inviteLimit?: number | null; - inviteCount?: number | null; - multiple?: boolean | null; - data?: Record | null; - expiresAt?: string | null; - entityId?: string | null; -} -export interface UpdateOrgInviteInput { - clientMutationId?: string; - id: string; - orgInvitePatch: OrgInvitePatch; + orgMembershipPatch: OrgMembershipPatch; } -export interface DeleteOrgInviteInput { +export interface DeleteOrgMembershipInput { clientMutationId?: string; id: string; } @@ -3884,51 +4071,6 @@ export type DeleteOrgOwnerGrantPayloadSelect = { select: OrgOwnerGrantEdgeSelect; }; }; -export interface CreateMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was created by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} -export type CreateMembershipTypePayloadSelect = { - clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; - }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; - }; -}; -export interface UpdateMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was updated by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} -export type UpdateMembershipTypePayloadSelect = { - clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; - }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; - }; -}; -export interface DeleteMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was deleted by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} -export type DeleteMembershipTypePayloadSelect = { - clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; - }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; - }; -}; export interface CreateAppLimitPayload { clientMutationId?: string | null; /** The `AppLimit` that was created by this mutation. */ @@ -4199,6 +4341,51 @@ export type DeleteOrgLimitPayloadSelect = { select: OrgLimitEdgeSelect; }; }; +export interface CreateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was created by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type CreateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface UpdateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was updated by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type UpdateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface DeleteMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was deleted by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type DeleteMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; export interface CreateAppGrantPayload { clientMutationId?: string | null; /** The `AppGrant` that was created by this mutation. */ @@ -4469,6 +4656,51 @@ export type DeleteOrgMembershipDefaultPayloadSelect = { select: OrgMembershipDefaultEdgeSelect; }; }; +export interface CreateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was created by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type CreateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface UpdateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was updated by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type UpdateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface DeleteOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was deleted by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type DeleteOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; export interface CreateAppLevelPayload { clientMutationId?: string | null; /** The `AppLevel` that was created by this mutation. */ @@ -4559,6 +4791,51 @@ export type DeleteAppInvitePayloadSelect = { select: AppInviteEdgeSelect; }; }; +export interface CreateOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was created by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} +export type CreateOrgInvitePayloadSelect = { + clientMutationId?: boolean; + orgInvite?: { + select: OrgInviteSelect; + }; + orgInviteEdge?: { + select: OrgInviteEdgeSelect; + }; +}; +export interface UpdateOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was updated by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} +export type UpdateOrgInvitePayloadSelect = { + clientMutationId?: boolean; + orgInvite?: { + select: OrgInviteSelect; + }; + orgInviteEdge?: { + select: OrgInviteEdgeSelect; + }; +}; +export interface DeleteOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was deleted by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} +export type DeleteOrgInvitePayloadSelect = { + clientMutationId?: boolean; + orgInvite?: { + select: OrgInviteSelect; + }; + orgInviteEdge?: { + select: OrgInviteEdgeSelect; + }; +}; export interface CreateAppMembershipPayload { clientMutationId?: string | null; /** The `AppMembership` that was created by this mutation. */ @@ -4649,51 +4926,6 @@ export type DeleteOrgMembershipPayloadSelect = { select: OrgMembershipEdgeSelect; }; }; -export interface CreateOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was created by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} -export type CreateOrgInvitePayloadSelect = { - clientMutationId?: boolean; - orgInvite?: { - select: OrgInviteSelect; - }; - orgInviteEdge?: { - select: OrgInviteEdgeSelect; - }; -}; -export interface UpdateOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was updated by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} -export type UpdateOrgInvitePayloadSelect = { - clientMutationId?: boolean; - orgInvite?: { - select: OrgInviteSelect; - }; - orgInviteEdge?: { - select: OrgInviteEdgeSelect; - }; -}; -export interface DeleteOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was deleted by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} -export type DeleteOrgInvitePayloadSelect = { - clientMutationId?: boolean; - orgInvite?: { - select: OrgInviteSelect; - }; - orgInviteEdge?: { - select: OrgInviteEdgeSelect; - }; -}; /** A `AppPermission` edge in the connection. */ export interface AppPermissionEdge { cursor?: string | null; @@ -4855,18 +5087,6 @@ export type OrgOwnerGrantEdgeSelect = { select: OrgOwnerGrantSelect; }; }; -/** A `MembershipType` edge in the connection. */ -export interface MembershipTypeEdge { - cursor?: string | null; - /** The `MembershipType` at the end of the edge. */ - node?: MembershipType | null; -} -export type MembershipTypeEdgeSelect = { - cursor?: boolean; - node?: { - select: MembershipTypeSelect; - }; -}; /** A `AppLimit` edge in the connection. */ export interface AppLimitEdge { cursor?: string | null; @@ -4939,6 +5159,18 @@ export type OrgLimitEdgeSelect = { select: OrgLimitSelect; }; }; +/** A `MembershipType` edge in the connection. */ +export interface MembershipTypeEdge { + cursor?: string | null; + /** The `MembershipType` at the end of the edge. */ + node?: MembershipType | null; +} +export type MembershipTypeEdgeSelect = { + cursor?: boolean; + node?: { + select: MembershipTypeSelect; + }; +}; /** A `AppGrant` edge in the connection. */ export interface AppGrantEdge { cursor?: string | null; @@ -5011,6 +5243,18 @@ export type OrgMembershipDefaultEdgeSelect = { select: OrgMembershipDefaultSelect; }; }; +/** A `OrgMemberProfile` edge in the connection. */ +export interface OrgMemberProfileEdge { + cursor?: string | null; + /** The `OrgMemberProfile` at the end of the edge. */ + node?: OrgMemberProfile | null; +} +export type OrgMemberProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgMemberProfileSelect; + }; +}; /** A `AppLevel` edge in the connection. */ export interface AppLevelEdge { cursor?: string | null; @@ -5035,6 +5279,18 @@ export type AppInviteEdgeSelect = { select: AppInviteSelect; }; }; +/** A `OrgInvite` edge in the connection. */ +export interface OrgInviteEdge { + cursor?: string | null; + /** The `OrgInvite` at the end of the edge. */ + node?: OrgInvite | null; +} +export type OrgInviteEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgInviteSelect; + }; +}; /** A `AppMembership` edge in the connection. */ export interface AppMembershipEdge { cursor?: string | null; @@ -5059,15 +5315,3 @@ export type OrgMembershipEdgeSelect = { select: OrgMembershipSelect; }; }; -/** A `OrgInvite` edge in the connection. */ -export interface OrgInviteEdge { - cursor?: string | null; - /** The `OrgInvite` at the end of the edge. */ - node?: OrgInvite | null; -} -export type OrgInviteEdgeSelect = { - cursor?: boolean; - node?: { - select: OrgInviteSelect; - }; -}; diff --git a/sdk/constructive-react/src/admin/orm/models/index.ts b/sdk/constructive-react/src/admin/orm/models/index.ts index 91876b01c..a82780d8f 100644 --- a/sdk/constructive-react/src/admin/orm/models/index.ts +++ b/sdk/constructive-react/src/admin/orm/models/index.ts @@ -17,21 +17,22 @@ export { AppLimitDefaultModel } from './appLimitDefault'; export { OrgLimitDefaultModel } from './orgLimitDefault'; export { OrgAdminGrantModel } from './orgAdminGrant'; export { OrgOwnerGrantModel } from './orgOwnerGrant'; -export { MembershipTypeModel } from './membershipType'; export { AppLimitModel } from './appLimit'; export { AppAchievementModel } from './appAchievement'; export { AppStepModel } from './appStep'; export { AppClaimedInviteModel } from './appClaimedInvite'; export { OrgChartEdgeGrantModel } from './orgChartEdgeGrant'; export { OrgLimitModel } from './orgLimit'; +export { MembershipTypeModel } from './membershipType'; export { AppGrantModel } from './appGrant'; export { AppMembershipDefaultModel } from './appMembershipDefault'; export { OrgClaimedInviteModel } from './orgClaimedInvite'; export { OrgGrantModel } from './orgGrant'; export { OrgChartEdgeModel } from './orgChartEdge'; export { OrgMembershipDefaultModel } from './orgMembershipDefault'; +export { OrgMemberProfileModel } from './orgMemberProfile'; export { AppLevelModel } from './appLevel'; export { AppInviteModel } from './appInvite'; +export { OrgInviteModel } from './orgInvite'; export { AppMembershipModel } from './appMembership'; export { OrgMembershipModel } from './orgMembership'; -export { OrgInviteModel } from './orgInvite'; diff --git a/sdk/constructive-cli/src/public/orm/models/connectedAccount.ts b/sdk/constructive-react/src/admin/orm/models/orgMemberProfile.ts similarity index 52% rename from sdk/constructive-cli/src/public/orm/models/connectedAccount.ts rename to sdk/constructive-react/src/admin/orm/models/orgMemberProfile.ts index c9def156d..de551ba79 100644 --- a/sdk/constructive-cli/src/public/orm/models/connectedAccount.ts +++ b/sdk/constructive-react/src/admin/orm/models/orgMemberProfile.ts @@ -1,5 +1,5 @@ /** - * ConnectedAccount model for ORM client + * OrgMemberProfile model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - ConnectedAccount, - ConnectedAccountWithRelations, - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy, - CreateConnectedAccountInput, - UpdateConnectedAccountInput, - ConnectedAccountPatch, + OrgMemberProfile, + OrgMemberProfileWithRelations, + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, + CreateOrgMemberProfileInput, + UpdateOrgMemberProfileInput, + OrgMemberProfilePatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class ConnectedAccountModel { +export class OrgMemberProfileModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccounts: ConnectionResult>; + orgMemberProfiles: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: args?.where, @@ -56,58 +56,58 @@ export class ConnectedAccountModel { before: args?.before, offset: args?.offset, }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccounts: { - nodes: InferSelectResult[]; + orgMemberProfiles: { + nodes: InferSelectResult[]; }; }> { const { document, variables } = buildFindFirstDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: args?.where, }, - 'ConnectedAccountFilter', + 'OrgMemberProfileFilter', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', document, variables, }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccount: InferSelectResult | null; + orgMemberProfile: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: { @@ -117,90 +117,90 @@ export class ConnectedAccountModel { }, first: 1, }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfile', document, variables, transform: (data: { - connectedAccounts?: { - nodes?: InferSelectResult[]; + orgMemberProfiles?: { + nodes?: InferSelectResult[]; }; }) => ({ - connectedAccount: data.connectedAccounts?.nodes?.[0] ?? null, + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createConnectedAccount: { - connectedAccount: InferSelectResult; + createOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'ConnectedAccount', - 'createConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'createOrgMemberProfile', + 'orgMemberProfile', args.select, args.data, - 'CreateConnectedAccountInput', + 'CreateOrgMemberProfileInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'createConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'createOrgMemberProfile', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - ConnectedAccountPatch + OrgMemberProfilePatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateConnectedAccount: { - connectedAccount: InferSelectResult; + updateOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'ConnectedAccount', - 'updateConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'updateOrgMemberProfile', + 'orgMemberProfile', args.select, args.where.id, args.data, - 'UpdateConnectedAccountInput', + 'UpdateOrgMemberProfileInput', 'id', - 'connectedAccountPatch', + 'orgMemberProfilePatch', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'updateConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'updateOrgMemberProfile', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -208,28 +208,28 @@ export class ConnectedAccountModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteConnectedAccount: { - connectedAccount: InferSelectResult; + deleteOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'ConnectedAccount', - 'deleteConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'deleteOrgMemberProfile', + 'orgMemberProfile', { id: args.where.id, }, - 'DeleteConnectedAccountInput', + 'DeleteOrgMemberProfileInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'deleteConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'deleteOrgMemberProfile', document, variables, }); diff --git a/sdk/constructive-react/src/admin/schema-types.ts b/sdk/constructive-react/src/admin/schema-types.ts index fedc7b465..7353bc083 100644 --- a/sdk/constructive-react/src/admin/schema-types.ts +++ b/sdk/constructive-react/src/admin/schema-types.ts @@ -32,6 +32,7 @@ import type { OrgLimit, OrgLimitDefault, OrgMember, + OrgMemberProfile, OrgMembership, OrgMembershipDefault, OrgOwnerGrant, @@ -184,19 +185,6 @@ export type OrgOwnerGrantOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `MembershipType`. */ -export type MembershipTypeOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'DESCRIPTION_ASC' - | 'DESCRIPTION_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC'; /** Methods to use when ordering `AppPermission`. */ export type AppPermissionOrderBy = | 'NATURAL' @@ -333,6 +321,23 @@ export type OrgLimitOrderBy = | 'MAX_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC'; +/** Methods to use when ordering `MembershipType`. */ +export type MembershipTypeOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PARENT_MEMBERSHIP_TYPE_ASC' + | 'PARENT_MEMBERSHIP_TYPE_DESC' + | 'HAS_USERS_TABLE_ENTRY_ASC' + | 'HAS_USERS_TABLE_ENTRY_DESC'; /** Methods to use when ordering `AppGrant`. */ export type AppGrantOrderBy = | 'NATURAL' @@ -476,6 +481,33 @@ export type OrgMembershipDefaultOrderBy = | 'DELETE_MEMBER_CASCADE_GROUPS_DESC' | 'CREATE_GROUPS_CASCADE_MEMBERS_ASC' | 'CREATE_GROUPS_CASCADE_MEMBERS_DESC'; +/** Methods to use when ordering `OrgMemberProfile`. */ +export type OrgMemberProfileOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'BIO_ASC' + | 'BIO_DESC' + | 'PROFILE_PICTURE_ASC' + | 'PROFILE_PICTURE_DESC'; /** Methods to use when ordering `AppLevel`. */ export type AppLevelOrderBy = | 'NATURAL' @@ -524,6 +556,39 @@ export type AppInviteOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `OrgInvite`. */ +export type OrgInviteOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'SENDER_ID_ASC' + | 'SENDER_ID_DESC' + | 'RECEIVER_ID_ASC' + | 'RECEIVER_ID_DESC' + | 'INVITE_TOKEN_ASC' + | 'INVITE_TOKEN_DESC' + | 'INVITE_VALID_ASC' + | 'INVITE_VALID_DESC' + | 'INVITE_LIMIT_ASC' + | 'INVITE_LIMIT_DESC' + | 'INVITE_COUNT_ASC' + | 'INVITE_COUNT_DESC' + | 'MULTIPLE_ASC' + | 'MULTIPLE_DESC' + | 'DATA_ASC' + | 'DATA_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC'; /** Methods to use when ordering `AppMembership`. */ export type AppMembershipOrderBy = | 'NATURAL' @@ -549,6 +614,8 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -584,6 +651,8 @@ export type OrgMembershipOrderBy = | 'IS_DISABLED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -596,41 +665,10 @@ export type OrgMembershipOrderBy = | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' | 'PROFILE_ID_ASC' | 'PROFILE_ID_DESC'; -/** Methods to use when ordering `OrgInvite`. */ -export type OrgInviteOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'EMAIL_ASC' - | 'EMAIL_DESC' - | 'SENDER_ID_ASC' - | 'SENDER_ID_DESC' - | 'RECEIVER_ID_ASC' - | 'RECEIVER_ID_DESC' - | 'INVITE_TOKEN_ASC' - | 'INVITE_TOKEN_DESC' - | 'INVITE_VALID_ASC' - | 'INVITE_VALID_DESC' - | 'INVITE_LIMIT_ASC' - | 'INVITE_LIMIT_DESC' - | 'INVITE_COUNT_ASC' - | 'INVITE_COUNT_DESC' - | 'MULTIPLE_ASC' - | 'MULTIPLE_DESC' - | 'DATA_ASC' - | 'DATA_DESC' - | 'EXPIRES_AT_ASC' - | 'EXPIRES_AT_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC'; /** A filter to be used against `OrgMember` object types. All fields are combined with a logical ‘and.’ */ export interface OrgMemberFilter { /** Filter by the object’s `id` field. */ @@ -794,23 +832,6 @@ export interface OrgOwnerGrantFilter { /** Negates the expression. */ not?: OrgOwnerGrantFilter; } -/** A filter to be used against `MembershipType` object types. All fields are combined with a logical ‘and.’ */ -export interface MembershipTypeFilter { - /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Checks for all expressions in this list. */ - and?: MembershipTypeFilter[]; - /** Checks for any expressions in this list. */ - or?: MembershipTypeFilter[]; - /** Negates the expression. */ - not?: MembershipTypeFilter; -} /** A filter to be used against `AppPermission` object types. All fields are combined with a logical ‘and.’ */ export interface AppPermissionFilter { /** Filter by the object’s `id` field. */ @@ -977,6 +998,27 @@ export interface OrgLimitFilter { /** Negates the expression. */ not?: OrgLimitFilter; } +/** A filter to be used against `MembershipType` object types. All fields are combined with a logical ‘and.’ */ +export interface MembershipTypeFilter { + /** Filter by the object’s `id` field. */ + id?: IntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `parentMembershipType` field. */ + parentMembershipType?: IntFilter; + /** Filter by the object’s `hasUsersTableEntry` field. */ + hasUsersTableEntry?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: MembershipTypeFilter[]; + /** Checks for any expressions in this list. */ + or?: MembershipTypeFilter[]; + /** Negates the expression. */ + not?: MembershipTypeFilter; +} /** A filter to be used against `AppGrant` object types. All fields are combined with a logical ‘and.’ */ export interface AppGrantFilter { /** Filter by the object’s `id` field. */ @@ -1146,28 +1188,38 @@ export interface OrgMembershipDefaultFilter { /** Negates the expression. */ not?: OrgMembershipDefaultFilter; } -/** A filter to be used against `AppLevel` object types. All fields are combined with a logical ‘and.’ */ -export interface AppLevelFilter { +/** A filter to be used against `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMemberProfileFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `image` field. */ - image?: ConstructiveInternalTypeImageFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; /** Checks for all expressions in this list. */ - and?: AppLevelFilter[]; + and?: OrgMemberProfileFilter[]; /** Checks for any expressions in this list. */ - or?: AppLevelFilter[]; + or?: OrgMemberProfileFilter[]; /** Negates the expression. */ - not?: AppLevelFilter; + not?: OrgMemberProfileFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; } /** A filter to be used against ConstructiveInternalTypeImage fields. All fields are combined with a logical ‘and.’ */ export interface ConstructiveInternalTypeImageFilter { @@ -1204,6 +1256,78 @@ export interface ConstructiveInternalTypeImageFilter { /** Contained by the specified JSON. */ containedBy?: ConstructiveInternalTypeImage; } +/** A filter to be used against `OrgMembership` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMembershipFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `createdBy` field. */ + createdBy?: UUIDFilter; + /** Filter by the object’s `updatedBy` field. */ + updatedBy?: UUIDFilter; + /** Filter by the object’s `isApproved` field. */ + isApproved?: BooleanFilter; + /** Filter by the object’s `isBanned` field. */ + isBanned?: BooleanFilter; + /** Filter by the object’s `isDisabled` field. */ + isDisabled?: BooleanFilter; + /** Filter by the object’s `isActive` field. */ + isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; + /** Filter by the object’s `isOwner` field. */ + isOwner?: BooleanFilter; + /** Filter by the object’s `isAdmin` field. */ + isAdmin?: BooleanFilter; + /** Filter by the object’s `permissions` field. */ + permissions?: BitStringFilter; + /** Filter by the object’s `granted` field. */ + granted?: BitStringFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; + /** Filter by the object’s `profileId` field. */ + profileId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgMembershipFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMembershipFilter[]; + /** Negates the expression. */ + not?: OrgMembershipFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; +} +/** A filter to be used against `AppLevel` object types. All fields are combined with a logical ‘and.’ */ +export interface AppLevelFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `image` field. */ + image?: ConstructiveInternalTypeImageFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: AppLevelFilter[]; + /** Checks for any expressions in this list. */ + or?: AppLevelFilter[]; + /** Negates the expression. */ + not?: AppLevelFilter; +} /** A filter to be used against `AppInvite` object types. All fields are combined with a logical ‘and.’ */ export interface AppInviteFilter { /** Filter by the object’s `id` field. */ @@ -1312,49 +1436,43 @@ export interface ConstructiveInternalTypeEmailFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: ConstructiveInternalTypeEmail; } -/** A filter to be used against `AppMembership` object types. All fields are combined with a logical ‘and.’ */ -export interface AppMembershipFilter { +/** A filter to be used against `OrgInvite` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgInviteFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; + /** Filter by the object’s `email` field. */ + email?: ConstructiveInternalTypeEmailFilter; + /** Filter by the object’s `senderId` field. */ + senderId?: UUIDFilter; + /** Filter by the object’s `receiverId` field. */ + receiverId?: UUIDFilter; + /** Filter by the object’s `inviteToken` field. */ + inviteToken?: StringFilter; + /** Filter by the object’s `inviteValid` field. */ + inviteValid?: BooleanFilter; + /** Filter by the object’s `inviteLimit` field. */ + inviteLimit?: IntFilter; + /** Filter by the object’s `inviteCount` field. */ + inviteCount?: IntFilter; + /** Filter by the object’s `multiple` field. */ + multiple?: BooleanFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; /** Filter by the object’s `createdAt` field. */ createdAt?: DatetimeFilter; /** Filter by the object’s `updatedAt` field. */ updatedAt?: DatetimeFilter; - /** Filter by the object’s `createdBy` field. */ - createdBy?: UUIDFilter; - /** Filter by the object’s `updatedBy` field. */ - updatedBy?: UUIDFilter; - /** Filter by the object’s `isApproved` field. */ - isApproved?: BooleanFilter; - /** Filter by the object’s `isBanned` field. */ - isBanned?: BooleanFilter; - /** Filter by the object’s `isDisabled` field. */ - isDisabled?: BooleanFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `isActive` field. */ - isActive?: BooleanFilter; - /** Filter by the object’s `isOwner` field. */ - isOwner?: BooleanFilter; - /** Filter by the object’s `isAdmin` field. */ - isAdmin?: BooleanFilter; - /** Filter by the object’s `permissions` field. */ - permissions?: BitStringFilter; - /** Filter by the object’s `granted` field. */ - granted?: BitStringFilter; - /** Filter by the object’s `actorId` field. */ - actorId?: UUIDFilter; - /** Filter by the object’s `profileId` field. */ - profileId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: AppMembershipFilter[]; + and?: OrgInviteFilter[]; /** Checks for any expressions in this list. */ - or?: AppMembershipFilter[]; + or?: OrgInviteFilter[]; /** Negates the expression. */ - not?: AppMembershipFilter; + not?: OrgInviteFilter; } -/** A filter to be used against `OrgMembership` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgMembershipFilter { +/** A filter to be used against `AppMembership` object types. All fields are combined with a logical ‘and.’ */ +export interface AppMembershipFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `createdAt` field. */ @@ -1371,8 +1489,12 @@ export interface OrgMembershipFilter { isBanned?: BooleanFilter; /** Filter by the object’s `isDisabled` field. */ isDisabled?: BooleanFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -1383,51 +1505,14 @@ export interface OrgMembershipFilter { granted?: BitStringFilter; /** Filter by the object’s `actorId` field. */ actorId?: UUIDFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ - and?: OrgMembershipFilter[]; - /** Checks for any expressions in this list. */ - or?: OrgMembershipFilter[]; - /** Negates the expression. */ - not?: OrgMembershipFilter; -} -/** A filter to be used against `OrgInvite` object types. All fields are combined with a logical ‘and.’ */ -export interface OrgInviteFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `email` field. */ - email?: ConstructiveInternalTypeEmailFilter; - /** Filter by the object’s `senderId` field. */ - senderId?: UUIDFilter; - /** Filter by the object’s `receiverId` field. */ - receiverId?: UUIDFilter; - /** Filter by the object’s `inviteToken` field. */ - inviteToken?: StringFilter; - /** Filter by the object’s `inviteValid` field. */ - inviteValid?: BooleanFilter; - /** Filter by the object’s `inviteLimit` field. */ - inviteLimit?: IntFilter; - /** Filter by the object’s `inviteCount` field. */ - inviteCount?: IntFilter; - /** Filter by the object’s `multiple` field. */ - multiple?: BooleanFilter; - /** Filter by the object’s `expiresAt` field. */ - expiresAt?: DatetimeFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: OrgInviteFilter[]; + and?: AppMembershipFilter[]; /** Checks for any expressions in this list. */ - or?: OrgInviteFilter[]; + or?: AppMembershipFilter[]; /** Negates the expression. */ - not?: OrgInviteFilter; + not?: AppMembershipFilter; } export interface SubmitAppInviteCodeInput { clientMutationId?: string; @@ -1570,22 +1655,6 @@ export interface OrgOwnerGrantInput { createdAt?: string; updatedAt?: string; } -export interface CreateMembershipTypeInput { - clientMutationId?: string; - /** The `MembershipType` to be created by this mutation. */ - membershipType: MembershipTypeInput; -} -/** An input for mutations affecting `MembershipType` */ -export interface MembershipTypeInput { - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; - /** Human-readable name of the membership type */ - name: string; - /** Description of what this membership type represents */ - description: string; - /** Short prefix used to namespace tables and functions for this membership scope */ - prefix: string; -} export interface CreateAppPermissionInput { clientMutationId?: string; /** The `AppPermission` to be created by this mutation. */ @@ -1729,6 +1798,26 @@ export interface OrgLimitInput { max?: number; entityId: string; } +export interface CreateMembershipTypeInput { + clientMutationId?: string; + /** The `MembershipType` to be created by this mutation. */ + membershipType: MembershipTypeInput; +} +/** An input for mutations affecting `MembershipType` */ +export interface MembershipTypeInput { + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; + /** Human-readable name of the membership type */ + name: string; + /** Description of what this membership type represents */ + description: string; + /** Short prefix used to namespace tables and functions for this membership scope */ + prefix: string; + /** Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) */ + parentMembershipType?: number; + /** When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs */ + hasUsersTableEntry?: boolean; +} export interface CreateAppGrantInput { clientMutationId?: string; /** The `AppGrant` to be created by this mutation. */ @@ -1865,6 +1954,33 @@ export interface OrgMembershipDefaultInput { /** When a group is created, whether to auto-add existing org members as group members */ createGroupsCascadeMembers?: boolean; } +export interface CreateOrgMemberProfileInput { + clientMutationId?: string; + /** The `OrgMemberProfile` to be created by this mutation. */ + orgMemberProfile: OrgMemberProfileInput; +} +/** An input for mutations affecting `OrgMemberProfile` */ +export interface OrgMemberProfileInput { + id?: string; + createdAt?: string; + updatedAt?: string; + /** References the membership this profile belongs to (1:1) */ + membershipId: string; + /** References the entity this profile belongs to (used for RLS lookups) */ + entityId: string; + /** References the user who owns this profile (for self-edit RLS) */ + actorId: string; + /** Display name shown to other entity members */ + displayName?: string; + /** Email address visible to other entity members (auto-populated from verified primary email) */ + email?: string; + /** Job title or role description visible to other entity members */ + title?: string; + /** Short biography visible to other entity members */ + bio?: string; + /** Profile picture visible to other entity members */ + profilePicture?: ConstructiveInternalTypeImage; +} export interface CreateAppLevelInput { clientMutationId?: string; /** The `AppLevel` to be created by this mutation. */ @@ -1913,6 +2029,38 @@ export interface AppInviteInput { createdAt?: string; updatedAt?: string; } +export interface CreateOrgInviteInput { + clientMutationId?: string; + /** The `OrgInvite` to be created by this mutation. */ + orgInvite: OrgInviteInput; +} +/** An input for mutations affecting `OrgInvite` */ +export interface OrgInviteInput { + id?: string; + /** Email address of the invited recipient */ + email?: ConstructiveInternalTypeEmail; + /** User ID of the member who sent this invitation */ + senderId?: string; + /** User ID of the intended recipient, if targeting a specific user */ + receiverId?: string; + /** Unique random hex token used to redeem this invitation */ + inviteToken?: string; + /** Whether this invitation is still valid and can be redeemed */ + inviteValid?: boolean; + /** Maximum number of times this invite can be claimed; -1 means unlimited */ + inviteLimit?: number; + /** Running count of how many times this invite has been claimed */ + inviteCount?: number; + /** Whether this invite can be claimed by multiple recipients */ + multiple?: boolean; + /** Optional JSON payload of additional invite metadata */ + data?: unknown; + /** Timestamp after which this invitation can no longer be redeemed */ + expiresAt?: string; + createdAt?: string; + updatedAt?: string; + entityId: string; +} export interface CreateAppMembershipInput { clientMutationId?: string; /** The `AppMembership` to be created by this mutation. */ @@ -1935,6 +2083,8 @@ export interface AppMembershipInput { isVerified?: boolean; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean; /** Whether the actor is the owner of this entity */ isOwner?: boolean; /** Whether the actor has admin privileges on this entity */ @@ -1967,6 +2117,8 @@ export interface OrgMembershipInput { isDisabled?: boolean; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean; /** Whether the actor is the owner of this entity */ isOwner?: boolean; /** Whether the actor has admin privileges on this entity */ @@ -1979,40 +2131,10 @@ export interface OrgMembershipInput { actorId: string; /** References the entity (org or group) this membership belongs to */ entityId: string; + /** Whether this member has read-only access (blocks mutations when true) */ + isReadOnly?: boolean; profileId?: string; } -export interface CreateOrgInviteInput { - clientMutationId?: string; - /** The `OrgInvite` to be created by this mutation. */ - orgInvite: OrgInviteInput; -} -/** An input for mutations affecting `OrgInvite` */ -export interface OrgInviteInput { - id?: string; - /** Email address of the invited recipient */ - email?: ConstructiveInternalTypeEmail; - /** User ID of the member who sent this invitation */ - senderId?: string; - /** User ID of the intended recipient, if targeting a specific user */ - receiverId?: string; - /** Unique random hex token used to redeem this invitation */ - inviteToken?: string; - /** Whether this invitation is still valid and can be redeemed */ - inviteValid?: boolean; - /** Maximum number of times this invite can be claimed; -1 means unlimited */ - inviteLimit?: number; - /** Running count of how many times this invite has been claimed */ - inviteCount?: number; - /** Whether this invite can be claimed by multiple recipients */ - multiple?: boolean; - /** Optional JSON payload of additional invite metadata */ - data?: unknown; - /** Timestamp after which this invitation can no longer be redeemed */ - expiresAt?: string; - createdAt?: string; - updatedAt?: string; - entityId: string; -} export interface UpdateOrgMemberInput { clientMutationId?: string; id: string; @@ -2145,33 +2267,15 @@ export interface UpdateOrgOwnerGrantInput { /** Represents an update to a `OrgOwnerGrant`. Fields that are set will be updated. */ export interface OrgOwnerGrantPatch { id?: string; - /** True to grant ownership, false to revoke ownership */ - isGrant?: boolean; - /** The member receiving or losing the ownership grant */ - actorId?: string; - /** The entity (org or group) this ownership grant applies to */ - entityId?: string; - grantorId?: string; - createdAt?: string; - updatedAt?: string; -} -export interface UpdateMembershipTypeInput { - clientMutationId?: string; - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; - /** An object where the defined keys will be set on the `MembershipType` being updated. */ - membershipTypePatch: MembershipTypePatch; -} -/** Represents an update to a `MembershipType`. Fields that are set will be updated. */ -export interface MembershipTypePatch { - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id?: number; - /** Human-readable name of the membership type */ - name?: string; - /** Description of what this membership type represents */ - description?: string; - /** Short prefix used to namespace tables and functions for this membership scope */ - prefix?: string; + /** True to grant ownership, false to revoke ownership */ + isGrant?: boolean; + /** The member receiving or losing the ownership grant */ + actorId?: string; + /** The entity (org or group) this ownership grant applies to */ + entityId?: string; + grantorId?: string; + createdAt?: string; + updatedAt?: string; } export interface UpdateAppPermissionInput { clientMutationId?: string; @@ -2324,6 +2428,28 @@ export interface OrgLimitPatch { max?: number; entityId?: string; } +export interface UpdateMembershipTypeInput { + clientMutationId?: string; + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; + /** An object where the defined keys will be set on the `MembershipType` being updated. */ + membershipTypePatch: MembershipTypePatch; +} +/** Represents an update to a `MembershipType`. Fields that are set will be updated. */ +export interface MembershipTypePatch { + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id?: number; + /** Human-readable name of the membership type */ + name?: string; + /** Description of what this membership type represents */ + description?: string; + /** Short prefix used to namespace tables and functions for this membership scope */ + prefix?: string; + /** Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) */ + parentMembershipType?: number; + /** When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs */ + hasUsersTableEntry?: boolean; +} export interface UpdateAppGrantInput { clientMutationId?: string; id: string; @@ -2467,6 +2593,36 @@ export interface OrgMembershipDefaultPatch { /** When a group is created, whether to auto-add existing org members as group members */ createGroupsCascadeMembers?: boolean; } +export interface UpdateOrgMemberProfileInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgMemberProfile` being updated. */ + orgMemberProfilePatch: OrgMemberProfilePatch; +} +/** Represents an update to a `OrgMemberProfile`. Fields that are set will be updated. */ +export interface OrgMemberProfilePatch { + id?: string; + createdAt?: string; + updatedAt?: string; + /** References the membership this profile belongs to (1:1) */ + membershipId?: string; + /** References the entity this profile belongs to (used for RLS lookups) */ + entityId?: string; + /** References the user who owns this profile (for self-edit RLS) */ + actorId?: string; + /** Display name shown to other entity members */ + displayName?: string; + /** Email address visible to other entity members (auto-populated from verified primary email) */ + email?: string; + /** Job title or role description visible to other entity members */ + title?: string; + /** Short biography visible to other entity members */ + bio?: string; + /** Profile picture visible to other entity members */ + profilePicture?: ConstructiveInternalTypeImage; + /** Upload for Profile picture visible to other entity members */ + profilePictureUpload?: File; +} export interface UpdateAppLevelInput { clientMutationId?: string; id: string; @@ -2519,6 +2675,39 @@ export interface AppInvitePatch { createdAt?: string; updatedAt?: string; } +export interface UpdateOrgInviteInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgInvite` being updated. */ + orgInvitePatch: OrgInvitePatch; +} +/** Represents an update to a `OrgInvite`. Fields that are set will be updated. */ +export interface OrgInvitePatch { + id?: string; + /** Email address of the invited recipient */ + email?: ConstructiveInternalTypeEmail; + /** User ID of the member who sent this invitation */ + senderId?: string; + /** User ID of the intended recipient, if targeting a specific user */ + receiverId?: string; + /** Unique random hex token used to redeem this invitation */ + inviteToken?: string; + /** Whether this invitation is still valid and can be redeemed */ + inviteValid?: boolean; + /** Maximum number of times this invite can be claimed; -1 means unlimited */ + inviteLimit?: number; + /** Running count of how many times this invite has been claimed */ + inviteCount?: number; + /** Whether this invite can be claimed by multiple recipients */ + multiple?: boolean; + /** Optional JSON payload of additional invite metadata */ + data?: unknown; + /** Timestamp after which this invitation can no longer be redeemed */ + expiresAt?: string; + createdAt?: string; + updatedAt?: string; + entityId?: string; +} export interface UpdateAppMembershipInput { clientMutationId?: string; id: string; @@ -2542,6 +2731,8 @@ export interface AppMembershipPatch { isVerified?: boolean; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean; /** Whether the actor is the owner of this entity */ isOwner?: boolean; /** Whether the actor has admin privileges on this entity */ @@ -2575,6 +2766,8 @@ export interface OrgMembershipPatch { isDisabled?: boolean; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean; /** Whether the actor is the owner of this entity */ isOwner?: boolean; /** Whether the actor has admin privileges on this entity */ @@ -2587,41 +2780,10 @@ export interface OrgMembershipPatch { actorId?: string; /** References the entity (org or group) this membership belongs to */ entityId?: string; + /** Whether this member has read-only access (blocks mutations when true) */ + isReadOnly?: boolean; profileId?: string; } -export interface UpdateOrgInviteInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `OrgInvite` being updated. */ - orgInvitePatch: OrgInvitePatch; -} -/** Represents an update to a `OrgInvite`. Fields that are set will be updated. */ -export interface OrgInvitePatch { - id?: string; - /** Email address of the invited recipient */ - email?: ConstructiveInternalTypeEmail; - /** User ID of the member who sent this invitation */ - senderId?: string; - /** User ID of the intended recipient, if targeting a specific user */ - receiverId?: string; - /** Unique random hex token used to redeem this invitation */ - inviteToken?: string; - /** Whether this invitation is still valid and can be redeemed */ - inviteValid?: boolean; - /** Maximum number of times this invite can be claimed; -1 means unlimited */ - inviteLimit?: number; - /** Running count of how many times this invite has been claimed */ - inviteCount?: number; - /** Whether this invite can be claimed by multiple recipients */ - multiple?: boolean; - /** Optional JSON payload of additional invite metadata */ - data?: unknown; - /** Timestamp after which this invitation can no longer be redeemed */ - expiresAt?: string; - createdAt?: string; - updatedAt?: string; - entityId?: string; -} export interface DeleteOrgMemberInput { clientMutationId?: string; id: string; @@ -2658,11 +2820,6 @@ export interface DeleteOrgOwnerGrantInput { clientMutationId?: string; id: string; } -export interface DeleteMembershipTypeInput { - clientMutationId?: string; - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; -} export interface DeleteAppPermissionInput { clientMutationId?: string; id: string; @@ -2695,6 +2852,11 @@ export interface DeleteOrgLimitInput { clientMutationId?: string; id: string; } +export interface DeleteMembershipTypeInput { + clientMutationId?: string; + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; +} export interface DeleteAppGrantInput { clientMutationId?: string; id: string; @@ -2723,6 +2885,10 @@ export interface DeleteOrgMembershipDefaultInput { clientMutationId?: string; id: string; } +export interface DeleteOrgMemberProfileInput { + clientMutationId?: string; + id: string; +} export interface DeleteAppLevelInput { clientMutationId?: string; id: string; @@ -2731,15 +2897,15 @@ export interface DeleteAppInviteInput { clientMutationId?: string; id: string; } -export interface DeleteAppMembershipInput { +export interface DeleteOrgInviteInput { clientMutationId?: string; id: string; } -export interface DeleteOrgMembershipInput { +export interface DeleteAppMembershipInput { clientMutationId?: string; id: string; } -export interface DeleteOrgInviteInput { +export interface DeleteOrgMembershipInput { clientMutationId?: string; id: string; } @@ -2861,13 +3027,6 @@ export interface OrgOwnerGrantConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `MembershipType` values. */ -export interface MembershipTypeConnection { - nodes: MembershipType[]; - edges: MembershipTypeEdge[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `AppLimit` values. */ export interface AppLimitConnection { nodes: AppLimit[]; @@ -2910,6 +3069,13 @@ export interface OrgLimitConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `MembershipType` values. */ +export interface MembershipTypeConnection { + nodes: MembershipType[]; + edges: MembershipTypeEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `AppGrant` values. */ export interface AppGrantConnection { nodes: AppGrant[]; @@ -2952,6 +3118,13 @@ export interface OrgMembershipDefaultConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `OrgMemberProfile` values. */ +export interface OrgMemberProfileConnection { + nodes: OrgMemberProfile[]; + edges: OrgMemberProfileEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `AppLevel` values. */ export interface AppLevelConnection { nodes: AppLevel[]; @@ -2966,6 +3139,13 @@ export interface AppInviteConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `OrgInvite` values. */ +export interface OrgInviteConnection { + nodes: OrgInvite[]; + edges: OrgInviteEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `AppMembership` values. */ export interface AppMembershipConnection { nodes: AppMembership[]; @@ -2980,13 +3160,6 @@ export interface OrgMembershipConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `OrgInvite` values. */ -export interface OrgInviteConnection { - nodes: OrgInvite[]; - edges: OrgInviteEdge[]; - pageInfo: PageInfo; - totalCount: number; -} /** Root meta schema type */ export interface MetaSchema { tables: MetaTable[]; @@ -3053,12 +3226,6 @@ export interface CreateOrgOwnerGrantPayload { orgOwnerGrant?: OrgOwnerGrant | null; orgOwnerGrantEdge?: OrgOwnerGrantEdge | null; } -export interface CreateMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was created by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} export interface CreateAppPermissionPayload { clientMutationId?: string | null; /** The `AppPermission` that was created by this mutation. */ @@ -3107,6 +3274,12 @@ export interface CreateOrgLimitPayload { orgLimit?: OrgLimit | null; orgLimitEdge?: OrgLimitEdge | null; } +export interface CreateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was created by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} export interface CreateAppGrantPayload { clientMutationId?: string | null; /** The `AppGrant` that was created by this mutation. */ @@ -3149,6 +3322,12 @@ export interface CreateOrgMembershipDefaultPayload { orgMembershipDefault?: OrgMembershipDefault | null; orgMembershipDefaultEdge?: OrgMembershipDefaultEdge | null; } +export interface CreateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was created by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} export interface CreateAppLevelPayload { clientMutationId?: string | null; /** The `AppLevel` that was created by this mutation. */ @@ -3161,6 +3340,12 @@ export interface CreateAppInvitePayload { appInvite?: AppInvite | null; appInviteEdge?: AppInviteEdge | null; } +export interface CreateOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was created by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} export interface CreateAppMembershipPayload { clientMutationId?: string | null; /** The `AppMembership` that was created by this mutation. */ @@ -3173,12 +3358,6 @@ export interface CreateOrgMembershipPayload { orgMembership?: OrgMembership | null; orgMembershipEdge?: OrgMembershipEdge | null; } -export interface CreateOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was created by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} export interface UpdateOrgMemberPayload { clientMutationId?: string | null; /** The `OrgMember` that was updated by this mutation. */ @@ -3233,12 +3412,6 @@ export interface UpdateOrgOwnerGrantPayload { orgOwnerGrant?: OrgOwnerGrant | null; orgOwnerGrantEdge?: OrgOwnerGrantEdge | null; } -export interface UpdateMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was updated by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} export interface UpdateAppPermissionPayload { clientMutationId?: string | null; /** The `AppPermission` that was updated by this mutation. */ @@ -3287,6 +3460,12 @@ export interface UpdateOrgLimitPayload { orgLimit?: OrgLimit | null; orgLimitEdge?: OrgLimitEdge | null; } +export interface UpdateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was updated by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} export interface UpdateAppGrantPayload { clientMutationId?: string | null; /** The `AppGrant` that was updated by this mutation. */ @@ -3329,6 +3508,12 @@ export interface UpdateOrgMembershipDefaultPayload { orgMembershipDefault?: OrgMembershipDefault | null; orgMembershipDefaultEdge?: OrgMembershipDefaultEdge | null; } +export interface UpdateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was updated by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} export interface UpdateAppLevelPayload { clientMutationId?: string | null; /** The `AppLevel` that was updated by this mutation. */ @@ -3341,6 +3526,12 @@ export interface UpdateAppInvitePayload { appInvite?: AppInvite | null; appInviteEdge?: AppInviteEdge | null; } +export interface UpdateOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was updated by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} export interface UpdateAppMembershipPayload { clientMutationId?: string | null; /** The `AppMembership` that was updated by this mutation. */ @@ -3353,12 +3544,6 @@ export interface UpdateOrgMembershipPayload { orgMembership?: OrgMembership | null; orgMembershipEdge?: OrgMembershipEdge | null; } -export interface UpdateOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was updated by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} export interface DeleteOrgMemberPayload { clientMutationId?: string | null; /** The `OrgMember` that was deleted by this mutation. */ @@ -3413,12 +3598,6 @@ export interface DeleteOrgOwnerGrantPayload { orgOwnerGrant?: OrgOwnerGrant | null; orgOwnerGrantEdge?: OrgOwnerGrantEdge | null; } -export interface DeleteMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was deleted by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} export interface DeleteAppPermissionPayload { clientMutationId?: string | null; /** The `AppPermission` that was deleted by this mutation. */ @@ -3467,6 +3646,12 @@ export interface DeleteOrgLimitPayload { orgLimit?: OrgLimit | null; orgLimitEdge?: OrgLimitEdge | null; } +export interface DeleteMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was deleted by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} export interface DeleteAppGrantPayload { clientMutationId?: string | null; /** The `AppGrant` that was deleted by this mutation. */ @@ -3509,6 +3694,12 @@ export interface DeleteOrgMembershipDefaultPayload { orgMembershipDefault?: OrgMembershipDefault | null; orgMembershipDefaultEdge?: OrgMembershipDefaultEdge | null; } +export interface DeleteOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was deleted by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} export interface DeleteAppLevelPayload { clientMutationId?: string | null; /** The `AppLevel` that was deleted by this mutation. */ @@ -3521,6 +3712,12 @@ export interface DeleteAppInvitePayload { appInvite?: AppInvite | null; appInviteEdge?: AppInviteEdge | null; } +export interface DeleteOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was deleted by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} export interface DeleteAppMembershipPayload { clientMutationId?: string | null; /** The `AppMembership` that was deleted by this mutation. */ @@ -3533,12 +3730,6 @@ export interface DeleteOrgMembershipPayload { orgMembership?: OrgMembership | null; orgMembershipEdge?: OrgMembershipEdge | null; } -export interface DeleteOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was deleted by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} export interface RequestUploadUrlPayload { /** Presigned PUT URL (null if file was deduplicated) */ uploadUrl?: string | null; @@ -3668,12 +3859,6 @@ export interface OrgOwnerGrantEdge { /** The `OrgOwnerGrant` at the end of the edge. */ node?: OrgOwnerGrant | null; } -/** A `MembershipType` edge in the connection. */ -export interface MembershipTypeEdge { - cursor?: string | null; - /** The `MembershipType` at the end of the edge. */ - node?: MembershipType | null; -} /** A `AppLimit` edge in the connection. */ export interface AppLimitEdge { cursor?: string | null; @@ -3710,6 +3895,12 @@ export interface OrgLimitEdge { /** The `OrgLimit` at the end of the edge. */ node?: OrgLimit | null; } +/** A `MembershipType` edge in the connection. */ +export interface MembershipTypeEdge { + cursor?: string | null; + /** The `MembershipType` at the end of the edge. */ + node?: MembershipType | null; +} /** A `AppGrant` edge in the connection. */ export interface AppGrantEdge { cursor?: string | null; @@ -3746,6 +3937,12 @@ export interface OrgMembershipDefaultEdge { /** The `OrgMembershipDefault` at the end of the edge. */ node?: OrgMembershipDefault | null; } +/** A `OrgMemberProfile` edge in the connection. */ +export interface OrgMemberProfileEdge { + cursor?: string | null; + /** The `OrgMemberProfile` at the end of the edge. */ + node?: OrgMemberProfile | null; +} /** A `AppLevel` edge in the connection. */ export interface AppLevelEdge { cursor?: string | null; @@ -3758,6 +3955,12 @@ export interface AppInviteEdge { /** The `AppInvite` at the end of the edge. */ node?: AppInvite | null; } +/** A `OrgInvite` edge in the connection. */ +export interface OrgInviteEdge { + cursor?: string | null; + /** The `OrgInvite` at the end of the edge. */ + node?: OrgInvite | null; +} /** A `AppMembership` edge in the connection. */ export interface AppMembershipEdge { cursor?: string | null; @@ -3770,12 +3973,6 @@ export interface OrgMembershipEdge { /** The `OrgMembership` at the end of the edge. */ node?: OrgMembership | null; } -/** A `OrgInvite` edge in the connection. */ -export interface OrgInviteEdge { - cursor?: string | null; - /** The `OrgInvite` at the end of the edge. */ - node?: OrgInvite | null; -} /** Information about a database table */ export interface MetaTable { name: string; diff --git a/sdk/constructive-react/src/admin/types.ts b/sdk/constructive-react/src/admin/types.ts index 3f07dc0f4..581c43cc8 100644 --- a/sdk/constructive-react/src/admin/types.ts +++ b/sdk/constructive-react/src/admin/types.ts @@ -96,12 +96,6 @@ export interface OrgOwnerGrant { createdAt: string | null; updatedAt: string | null; } -export interface MembershipType { - id: number | null; - name: string | null; - description: string | null; - prefix: string | null; -} export interface AppLimit { id: string | null; name: string | null; @@ -152,6 +146,14 @@ export interface OrgLimit { max: number | null; entityId: string | null; } +export interface MembershipType { + id: number | null; + name: string | null; + description: string | null; + prefix: string | null; + parentMembershipType: number | null; + hasUsersTableEntry: boolean | null; +} export interface AppGrant { id: string | null; permissions: string | null; @@ -210,6 +212,19 @@ export interface OrgMembershipDefault { deleteMemberCascadeGroups: boolean | null; createGroupsCascadeMembers: boolean | null; } +export interface OrgMemberProfile { + id: string | null; + createdAt: string | null; + updatedAt: string | null; + membershipId: string | null; + entityId: string | null; + actorId: string | null; + displayName: string | null; + email: string | null; + title: string | null; + bio: string | null; + profilePicture: ConstructiveInternalTypeImage | null; +} export interface AppLevel { id: string | null; name: string | null; @@ -233,6 +248,22 @@ export interface AppInvite { createdAt: string | null; updatedAt: string | null; } +export interface OrgInvite { + id: string | null; + email: ConstructiveInternalTypeEmail | null; + senderId: string | null; + receiverId: string | null; + inviteToken: string | null; + inviteValid: boolean | null; + inviteLimit: number | null; + inviteCount: number | null; + multiple: boolean | null; + data: unknown | null; + expiresAt: string | null; + createdAt: string | null; + updatedAt: string | null; + entityId: string | null; +} export interface AppMembership { id: string | null; createdAt: string | null; @@ -244,6 +275,7 @@ export interface AppMembership { isDisabled: boolean | null; isVerified: boolean | null; isActive: boolean | null; + isExternal: boolean | null; isOwner: boolean | null; isAdmin: boolean | null; permissions: string | null; @@ -261,30 +293,16 @@ export interface OrgMembership { isBanned: boolean | null; isDisabled: boolean | null; isActive: boolean | null; + isExternal: boolean | null; isOwner: boolean | null; isAdmin: boolean | null; permissions: string | null; granted: string | null; actorId: string | null; entityId: string | null; + isReadOnly: boolean | null; profileId: string | null; } -export interface OrgInvite { - id: string | null; - email: ConstructiveInternalTypeEmail | null; - senderId: string | null; - receiverId: string | null; - inviteToken: string | null; - inviteValid: boolean | null; - inviteLimit: number | null; - inviteCount: number | null; - multiple: boolean | null; - data: unknown | null; - expiresAt: string | null; - createdAt: string | null; - updatedAt: string | null; - entityId: string | null; -} export interface StringFilter { isNull?: boolean; equalTo?: string; diff --git a/sdk/constructive-react/src/auth/README.md b/sdk/constructive-react/src/auth/README.md index 0c5ad40ae..bb245d02e 100644 --- a/sdk/constructive-react/src/auth/README.md +++ b/sdk/constructive-react/src/auth/README.md @@ -9,8 +9,8 @@ ## Overview - **Tables:** 7 -- **Custom queries:** 4 -- **Custom mutations:** 19 +- **Custom queries:** 5 +- **Custom mutations:** 24 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/auth/hooks/README.md b/sdk/constructive-react/src/auth/hooks/README.md index 544ab8766..43a121a5e 100644 --- a/sdk/constructive-react/src/auth/hooks/README.md +++ b/sdk/constructive-react/src/auth/hooks/README.md @@ -47,11 +47,6 @@ function App() { | `useCreateCryptoAddressMutation` | Mutation | Cryptocurrency wallet addresses owned by users, with network-specific validation and verification | | `useUpdateCryptoAddressMutation` | Mutation | Cryptocurrency wallet addresses owned by users, with network-specific validation and verification | | `useDeleteCryptoAddressMutation` | Mutation | Cryptocurrency wallet addresses owned by users, with network-specific validation and verification | -| `useConnectedAccountsQuery` | Query | OAuth and social login connections linking external service accounts to users | -| `useConnectedAccountQuery` | Query | OAuth and social login connections linking external service accounts to users | -| `useCreateConnectedAccountMutation` | Mutation | OAuth and social login connections linking external service accounts to users | -| `useUpdateConnectedAccountMutation` | Mutation | OAuth and social login connections linking external service accounts to users | -| `useDeleteConnectedAccountMutation` | Mutation | OAuth and social login connections linking external service accounts to users | | `useAuditLogsQuery` | Query | Append-only audit log of authentication events (sign-in, sign-up, password changes, etc.) | | `useAuditLogQuery` | Query | Append-only audit log of authentication events (sign-in, sign-up, password changes, etc.) | | `useCreateAuditLogMutation` | Mutation | Append-only audit log of authentication events (sign-in, sign-up, password changes, etc.) | @@ -62,28 +57,39 @@ function App() { | `useCreateRoleTypeMutation` | Mutation | Create a roleType | | `useUpdateRoleTypeMutation` | Mutation | Update a roleType | | `useDeleteRoleTypeMutation` | Mutation | Delete a roleType | +| `useUserConnectedAccountsQuery` | Query | List all userConnectedAccounts | +| `useUserConnectedAccountQuery` | Query | Get one userConnectedAccount | +| `useCreateUserConnectedAccountMutation` | Mutation | Create a userConnectedAccount | +| `useUpdateUserConnectedAccountMutation` | Mutation | Update a userConnectedAccount | +| `useDeleteUserConnectedAccountMutation` | Mutation | Delete a userConnectedAccount | | `useUsersQuery` | Query | List all users | | `useUserQuery` | Query | Get one user | | `useCreateUserMutation` | Mutation | Create a user | | `useUpdateUserMutation` | Mutation | Update a user | | `useDeleteUserMutation` | Mutation | Delete a user | -| `useCurrentIpAddressQuery` | Query | currentIpAddress | | `useCurrentUserAgentQuery` | Query | currentUserAgent | +| `useCurrentIpAddressQuery` | Query | currentIpAddress | | `useCurrentUserIdQuery` | Query | currentUserId | +| `useRequireStepUpQuery` | Query | requireStepUp | | `useCurrentUserQuery` | Query | currentUser | | `useSignOutMutation` | Mutation | signOut | | `useSendAccountDeletionEmailMutation` | Mutation | sendAccountDeletionEmail | | `useCheckPasswordMutation` | Mutation | checkPassword | +| `useDisconnectAccountMutation` | Mutation | disconnectAccount | +| `useRevokeApiKeyMutation` | Mutation | revokeApiKey | +| `useRevokeSessionMutation` | Mutation | revokeSession | | `useVerifyPasswordMutation` | Mutation | verifyPassword | | `useVerifyTotpMutation` | Mutation | verifyTotp | | `useConfirmDeleteAccountMutation` | Mutation | confirmDeleteAccount | | `useSetPasswordMutation` | Mutation | setPassword | | `useVerifyEmailMutation` | Mutation | verifyEmail | +| `useProvisionNewUserMutation` | Mutation | provisionNewUser | | `useResetPasswordMutation` | Mutation | resetPassword | -| `useSignInOneTimeTokenMutation` | Mutation | signInOneTimeToken | -| `useSignInMutation` | Mutation | signIn | +| `useCreateApiKeyMutation` | Mutation | createApiKey | +| `useSignInCrossOriginMutation` | Mutation | signInCrossOrigin | | `useSignUpMutation` | Mutation | signUp | -| `useOneTimeTokenMutation` | Mutation | oneTimeToken | +| `useRequestCrossOriginTokenMutation` | Mutation | requestCrossOriginToken | +| `useSignInMutation` | Mutation | signIn | | `useExtendTokenExpiresMutation` | Mutation | extendTokenExpires | | `useForgotPasswordMutation` | Mutation | forgotPassword | | `useSendVerificationEmailMutation` | Mutation | sendVerificationEmail | @@ -164,27 +170,6 @@ const { mutate: create } = useCreateCryptoAddressMutation({ create({ ownerId: '', address: '', isVerified: '', isPrimary: '' }); ``` -### ConnectedAccount - -```typescript -// List all connectedAccounts -const { data, isLoading } = useConnectedAccountsQuery({ - selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }, -}); - -// Get one connectedAccount -const { data: item } = useConnectedAccountQuery({ - id: '', - selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }, -}); - -// Create a connectedAccount -const { mutate: create } = useCreateConnectedAccountMutation({ - selection: { fields: { id: true } }, -}); -create({ ownerId: '', service: '', identifier: '', details: '', isVerified: '' }); -``` - ### AuditLog ```typescript @@ -227,6 +212,27 @@ const { mutate: create } = useCreateRoleTypeMutation({ create({ name: '' }); ``` +### UserConnectedAccount + +```typescript +// List all userConnectedAccounts +const { data, isLoading } = useUserConnectedAccountsQuery({ + selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }, +}); + +// Get one userConnectedAccount +const { data: item } = useUserConnectedAccountQuery({ + id: '', + selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }, +}); + +// Create a userConnectedAccount +const { mutate: create } = useCreateUserConnectedAccountMutation({ + selection: { fields: { id: true } }, +}); +create({ ownerId: '', service: '', identifier: '', details: '', isVerified: '' }); +``` + ### User ```typescript @@ -250,16 +256,16 @@ create({ username: '', displayName: '', profilePicture: ' ## Custom Operation Hooks -### `useCurrentIpAddressQuery` +### `useCurrentUserAgentQuery` -currentIpAddress +currentUserAgent - **Type:** query - **Arguments:** none -### `useCurrentUserAgentQuery` +### `useCurrentIpAddressQuery` -currentUserAgent +currentIpAddress - **Type:** query - **Arguments:** none @@ -271,6 +277,17 @@ currentUserId - **Type:** query - **Arguments:** none +### `useRequireStepUpQuery` + +requireStepUp + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `stepUpType` | String | + ### `useCurrentUserQuery` currentUser @@ -311,6 +328,39 @@ checkPassword |----------|------| | `input` | CheckPasswordInput (required) | +### `useDisconnectAccountMutation` + +disconnectAccount + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DisconnectAccountInput (required) | + +### `useRevokeApiKeyMutation` + +revokeApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeApiKeyInput (required) | + +### `useRevokeSessionMutation` + +revokeSession + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeSessionInput (required) | + ### `useVerifyPasswordMutation` verifyPassword @@ -366,6 +416,17 @@ verifyEmail |----------|------| | `input` | VerifyEmailInput (required) | +### `useProvisionNewUserMutation` + +provisionNewUser + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionNewUserInput (required) | + ### `useResetPasswordMutation` resetPassword @@ -377,27 +438,27 @@ resetPassword |----------|------| | `input` | ResetPasswordInput (required) | -### `useSignInOneTimeTokenMutation` +### `useCreateApiKeyMutation` -signInOneTimeToken +createApiKey - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInOneTimeTokenInput (required) | + | `input` | CreateApiKeyInput (required) | -### `useSignInMutation` +### `useSignInCrossOriginMutation` -signIn +signInCrossOrigin - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInInput (required) | + | `input` | SignInCrossOriginInput (required) | ### `useSignUpMutation` @@ -410,16 +471,27 @@ signUp |----------|------| | `input` | SignUpInput (required) | -### `useOneTimeTokenMutation` +### `useRequestCrossOriginTokenMutation` -oneTimeToken +requestCrossOriginToken - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | OneTimeTokenInput (required) | + | `input` | RequestCrossOriginTokenInput (required) | + +### `useSignInMutation` + +signIn + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SignInInput (required) | ### `useExtendTokenExpiresMutation` diff --git a/sdk/constructive-react/src/auth/hooks/index.ts b/sdk/constructive-react/src/auth/hooks/index.ts index dd9a304a0..9176674ee 100644 --- a/sdk/constructive-react/src/auth/hooks/index.ts +++ b/sdk/constructive-react/src/auth/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: Email, PhoneNumber, CryptoAddress, ConnectedAccount, AuditLog, RoleType, User + * Tables: Email, PhoneNumber, CryptoAddress, AuditLog, RoleType, UserConnectedAccount, User * * Usage: * diff --git a/sdk/constructive-react/src/auth/hooks/invalidation.ts b/sdk/constructive-react/src/auth/hooks/invalidation.ts index 1a19dc686..b77e1b680 100644 --- a/sdk/constructive-react/src/auth/hooks/invalidation.ts +++ b/sdk/constructive-react/src/auth/hooks/invalidation.ts @@ -18,9 +18,9 @@ import { emailKeys, phoneNumberKeys, cryptoAddressKeys, - connectedAccountKeys, auditLogKeys, roleTypeKeys, + userConnectedAccountKeys, userKeys, } from './query-keys'; /** @@ -91,23 +91,6 @@ export const invalidate = { queryKey: cryptoAddressKeys.detail(id), }), }, - /** Invalidate connectedAccount queries */ connectedAccount: { - /** Invalidate all connectedAccount queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.all, - }), - /** Invalidate connectedAccount list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.lists(), - }), - /** Invalidate a specific connectedAccount */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.detail(id), - }), - }, /** Invalidate auditLog queries */ auditLog: { /** Invalidate all auditLog queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -136,6 +119,23 @@ export const invalidate = { queryKey: roleTypeKeys.detail(id), }), }, + /** Invalidate userConnectedAccount queries */ userConnectedAccount: { + /** Invalidate all userConnectedAccount queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: userConnectedAccountKeys.all, + }), + /** Invalidate userConnectedAccount list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: userConnectedAccountKeys.lists(), + }), + /** Invalidate a specific userConnectedAccount */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: userConnectedAccountKeys.detail(id), + }), + }, /** Invalidate user queries */ user: { /** Invalidate all user queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -184,14 +184,6 @@ export const remove = { queryKey: cryptoAddressKeys.detail(id), }); }, - /** Remove connectedAccount from cache */ connectedAccount: ( - queryClient: QueryClient, - id: string | number - ) => { - queryClient.removeQueries({ - queryKey: connectedAccountKeys.detail(id), - }); - }, /** Remove auditLog from cache */ auditLog: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: auditLogKeys.detail(id), @@ -202,6 +194,14 @@ export const remove = { queryKey: roleTypeKeys.detail(id), }); }, + /** Remove userConnectedAccount from cache */ userConnectedAccount: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: userConnectedAccountKeys.detail(id), + }); + }, /** Remove user from cache */ user: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: userKeys.detail(id), diff --git a/sdk/constructive-react/src/auth/hooks/mutation-keys.ts b/sdk/constructive-react/src/auth/hooks/mutation-keys.ts index a249350ea..f64421d37 100644 --- a/sdk/constructive-react/src/auth/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/auth/hooks/mutation-keys.ts @@ -44,15 +44,6 @@ export const cryptoAddressMutationKeys = { /** Delete cryptoAddress mutation key */ delete: (id: string | number) => ['mutation', 'cryptoaddress', 'delete', id] as const, } as const; -export const connectedAccountMutationKeys = { - /** All connectedAccount mutation keys */ all: ['mutation', 'connectedaccount'] as const, - /** Create connectedAccount mutation key */ create: () => - ['mutation', 'connectedaccount', 'create'] as const, - /** Update connectedAccount mutation key */ update: (id: string | number) => - ['mutation', 'connectedaccount', 'update', id] as const, - /** Delete connectedAccount mutation key */ delete: (id: string | number) => - ['mutation', 'connectedaccount', 'delete', id] as const, -} as const; export const auditLogMutationKeys = { /** All auditLog mutation keys */ all: ['mutation', 'auditlog'] as const, /** Create auditLog mutation key */ create: () => ['mutation', 'auditlog', 'create'] as const, @@ -69,6 +60,15 @@ export const roleTypeMutationKeys = { /** Delete roleType mutation key */ delete: (id: string | number) => ['mutation', 'roletype', 'delete', id] as const, } as const; +export const userConnectedAccountMutationKeys = { + /** All userConnectedAccount mutation keys */ all: ['mutation', 'userconnectedaccount'] as const, + /** Create userConnectedAccount mutation key */ create: () => + ['mutation', 'userconnectedaccount', 'create'] as const, + /** Update userConnectedAccount mutation key */ update: (id: string | number) => + ['mutation', 'userconnectedaccount', 'update', id] as const, + /** Delete userConnectedAccount mutation key */ delete: (id: string | number) => + ['mutation', 'userconnectedaccount', 'delete', id] as const, +} as const; export const userMutationKeys = { /** All user mutation keys */ all: ['mutation', 'user'] as const, /** Create user mutation key */ create: () => ['mutation', 'user', 'create'] as const, @@ -97,6 +97,18 @@ export const customMutationKeys = { identifier ? (['mutation', 'checkPassword', identifier] as const) : (['mutation', 'checkPassword'] as const), + /** Mutation key for disconnectAccount */ disconnectAccount: (identifier?: string) => + identifier + ? (['mutation', 'disconnectAccount', identifier] as const) + : (['mutation', 'disconnectAccount'] as const), + /** Mutation key for revokeApiKey */ revokeApiKey: (identifier?: string) => + identifier + ? (['mutation', 'revokeApiKey', identifier] as const) + : (['mutation', 'revokeApiKey'] as const), + /** Mutation key for revokeSession */ revokeSession: (identifier?: string) => + identifier + ? (['mutation', 'revokeSession', identifier] as const) + : (['mutation', 'revokeSession'] as const), /** Mutation key for verifyPassword */ verifyPassword: (identifier?: string) => identifier ? (['mutation', 'verifyPassword', identifier] as const) @@ -117,22 +129,30 @@ export const customMutationKeys = { identifier ? (['mutation', 'verifyEmail', identifier] as const) : (['mutation', 'verifyEmail'] as const), + /** Mutation key for provisionNewUser */ provisionNewUser: (identifier?: string) => + identifier + ? (['mutation', 'provisionNewUser', identifier] as const) + : (['mutation', 'provisionNewUser'] as const), /** Mutation key for resetPassword */ resetPassword: (identifier?: string) => identifier ? (['mutation', 'resetPassword', identifier] as const) : (['mutation', 'resetPassword'] as const), - /** Mutation key for signInOneTimeToken */ signInOneTimeToken: (identifier?: string) => + /** Mutation key for createApiKey */ createApiKey: (identifier?: string) => identifier - ? (['mutation', 'signInOneTimeToken', identifier] as const) - : (['mutation', 'signInOneTimeToken'] as const), - /** Mutation key for signIn */ signIn: (identifier?: string) => - identifier ? (['mutation', 'signIn', identifier] as const) : (['mutation', 'signIn'] as const), + ? (['mutation', 'createApiKey', identifier] as const) + : (['mutation', 'createApiKey'] as const), + /** Mutation key for signInCrossOrigin */ signInCrossOrigin: (identifier?: string) => + identifier + ? (['mutation', 'signInCrossOrigin', identifier] as const) + : (['mutation', 'signInCrossOrigin'] as const), /** Mutation key for signUp */ signUp: (identifier?: string) => identifier ? (['mutation', 'signUp', identifier] as const) : (['mutation', 'signUp'] as const), - /** Mutation key for oneTimeToken */ oneTimeToken: (identifier?: string) => + /** Mutation key for requestCrossOriginToken */ requestCrossOriginToken: (identifier?: string) => identifier - ? (['mutation', 'oneTimeToken', identifier] as const) - : (['mutation', 'oneTimeToken'] as const), + ? (['mutation', 'requestCrossOriginToken', identifier] as const) + : (['mutation', 'requestCrossOriginToken'] as const), + /** Mutation key for signIn */ signIn: (identifier?: string) => + identifier ? (['mutation', 'signIn', identifier] as const) : (['mutation', 'signIn'] as const), /** Mutation key for extendTokenExpires */ extendTokenExpires: (identifier?: string) => identifier ? (['mutation', 'extendTokenExpires', identifier] as const) @@ -184,9 +204,9 @@ export const mutationKeys = { email: emailMutationKeys, phoneNumber: phoneNumberMutationKeys, cryptoAddress: cryptoAddressMutationKeys, - connectedAccount: connectedAccountMutationKeys, auditLog: auditLogMutationKeys, roleType: roleTypeMutationKeys, + userConnectedAccount: userConnectedAccountMutationKeys, user: userMutationKeys, custom: customMutationKeys, } as const; diff --git a/sdk/constructive-react/src/auth/hooks/mutations/index.ts b/sdk/constructive-react/src/auth/hooks/mutations/index.ts index 38e82961f..717dbd55a 100644 --- a/sdk/constructive-react/src/auth/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/auth/hooks/mutations/index.ts @@ -12,31 +12,34 @@ export * from './useDeletePhoneNumberMutation'; export * from './useCreateCryptoAddressMutation'; export * from './useUpdateCryptoAddressMutation'; export * from './useDeleteCryptoAddressMutation'; -export * from './useCreateConnectedAccountMutation'; -export * from './useUpdateConnectedAccountMutation'; -export * from './useDeleteConnectedAccountMutation'; export * from './useCreateAuditLogMutation'; export * from './useUpdateAuditLogMutation'; export * from './useDeleteAuditLogMutation'; export * from './useCreateRoleTypeMutation'; export * from './useUpdateRoleTypeMutation'; export * from './useDeleteRoleTypeMutation'; +export * from './useCreateUserConnectedAccountMutation'; export * from './useCreateUserMutation'; export * from './useUpdateUserMutation'; export * from './useDeleteUserMutation'; export * from './useSignOutMutation'; export * from './useSendAccountDeletionEmailMutation'; export * from './useCheckPasswordMutation'; +export * from './useDisconnectAccountMutation'; +export * from './useRevokeApiKeyMutation'; +export * from './useRevokeSessionMutation'; export * from './useVerifyPasswordMutation'; export * from './useVerifyTotpMutation'; export * from './useConfirmDeleteAccountMutation'; export * from './useSetPasswordMutation'; export * from './useVerifyEmailMutation'; +export * from './useProvisionNewUserMutation'; export * from './useResetPasswordMutation'; -export * from './useSignInOneTimeTokenMutation'; -export * from './useSignInMutation'; +export * from './useCreateApiKeyMutation'; +export * from './useSignInCrossOriginMutation'; export * from './useSignUpMutation'; -export * from './useOneTimeTokenMutation'; +export * from './useRequestCrossOriginTokenMutation'; +export * from './useSignInMutation'; export * from './useExtendTokenExpiresMutation'; export * from './useForgotPasswordMutation'; export * from './useSendVerificationEmailMutation'; diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useOneTimeTokenMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useCreateApiKeyMutation.ts similarity index 55% rename from sdk/constructive-react/src/auth/hooks/mutations/useOneTimeTokenMutation.ts rename to sdk/constructive-react/src/auth/hooks/mutations/useCreateApiKeyMutation.ts index 0215b7d08..bd74ac134 100644 --- a/sdk/constructive-react/src/auth/hooks/mutations/useOneTimeTokenMutation.ts +++ b/sdk/constructive-react/src/auth/hooks/mutations/useCreateApiKeyMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for oneTimeToken + * Custom mutation hook for createApiKey * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -10,45 +10,45 @@ import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; -import type { OneTimeTokenVariables } from '../../orm/mutation'; -import type { OneTimeTokenPayloadSelect, OneTimeTokenPayload } from '../../orm/input-types'; +import type { CreateApiKeyVariables } from '../../orm/mutation'; +import type { CreateApiKeyPayloadSelect, CreateApiKeyPayload } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { OneTimeTokenVariables } from '../../orm/mutation'; -export type { OneTimeTokenPayloadSelect } from '../../orm/input-types'; -export function useOneTimeTokenMutation( +export type { CreateApiKeyVariables } from '../../orm/mutation'; +export type { CreateApiKeyPayloadSelect } from '../../orm/input-types'; +export function useCreateApiKeyMutation( params: { selection: { - fields: S & OneTimeTokenPayloadSelect; - } & HookStrictSelect, OneTimeTokenPayloadSelect>; + fields: S & CreateApiKeyPayloadSelect; + } & HookStrictSelect, CreateApiKeyPayloadSelect>; } & Omit< UseMutationOptions< { - oneTimeToken: InferSelectResult | null; + createApiKey: InferSelectResult | null; }, Error, - OneTimeTokenVariables + CreateApiKeyVariables >, 'mutationFn' > ): UseMutationResult< { - oneTimeToken: InferSelectResult | null; + createApiKey: InferSelectResult | null; }, Error, - OneTimeTokenVariables + CreateApiKeyVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.oneTimeToken(), - mutationFn: (variables: OneTimeTokenVariables) => + mutationKey: customMutationKeys.createApiKey(), + mutationFn: (variables: CreateApiKeyVariables) => getClient() - .mutation.oneTimeToken(variables, { + .mutation.createApiKey(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useCreateConnectedAccountMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useCreateConnectedAccountMutation.ts deleted file mode 100644 index b07049d9a..000000000 --- a/sdk/constructive-react/src/auth/hooks/mutations/useCreateConnectedAccountMutation.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * OAuth and social login connections linking external service accounts to users - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { connectedAccountKeys } from '../query-keys'; -import { connectedAccountMutationKeys } from '../mutation-keys'; -import type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - CreateConnectedAccountInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - CreateConnectedAccountInput, -} from '../../orm/input-types'; -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateConnectedAccountMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateConnectedAccountMutation( - params: { - selection: { - fields: S & ConnectedAccountSelect; - } & HookStrictSelect, ConnectedAccountSelect>; - } & Omit< - UseMutationOptions< - { - createConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }, - Error, - CreateConnectedAccountInput['connectedAccount'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }, - Error, - CreateConnectedAccountInput['connectedAccount'] ->; -export function useCreateConnectedAccountMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: connectedAccountMutationKeys.create(), - mutationFn: (data: CreateConnectedAccountInput['connectedAccount']) => - getClient() - .connectedAccount.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useCreateUserConnectedAccountMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useCreateUserConnectedAccountMutation.ts new file mode 100644 index 000000000..6c0f3a519 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useCreateUserConnectedAccountMutation.ts @@ -0,0 +1,91 @@ +/** + * Create mutation hook for UserConnectedAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { userConnectedAccountKeys } from '../query-keys'; +import { userConnectedAccountMutationKeys } from '../mutation-keys'; +import type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, + CreateUserConnectedAccountInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, + CreateUserConnectedAccountInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a UserConnectedAccount + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateUserConnectedAccountMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateUserConnectedAccountMutation( + params: { + selection: { + fields: S & UserConnectedAccountSelect; + } & HookStrictSelect, UserConnectedAccountSelect>; + } & Omit< + UseMutationOptions< + { + createUserConnectedAccount: { + userConnectedAccount: InferSelectResult; + }; + }, + Error, + CreateUserConnectedAccountInput['userConnectedAccount'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createUserConnectedAccount: { + userConnectedAccount: InferSelectResult; + }; + }, + Error, + CreateUserConnectedAccountInput['userConnectedAccount'] +>; +export function useCreateUserConnectedAccountMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: userConnectedAccountMutationKeys.create(), + mutationFn: (data: CreateUserConnectedAccountInput['userConnectedAccount']) => + getClient() + .userConnectedAccount.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: userConnectedAccountKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useSignInOneTimeTokenMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useDisconnectAccountMutation.ts similarity index 51% rename from sdk/constructive-react/src/public/hooks/mutations/useSignInOneTimeTokenMutation.ts rename to sdk/constructive-react/src/auth/hooks/mutations/useDisconnectAccountMutation.ts index 2485fe1a6..8efb93805 100644 --- a/sdk/constructive-react/src/public/hooks/mutations/useSignInOneTimeTokenMutation.ts +++ b/sdk/constructive-react/src/auth/hooks/mutations/useDisconnectAccountMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for signInOneTimeToken + * Custom mutation hook for disconnectAccount * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -10,48 +10,48 @@ import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; -import type { SignInOneTimeTokenVariables } from '../../orm/mutation'; +import type { DisconnectAccountVariables } from '../../orm/mutation'; import type { - SignInOneTimeTokenPayloadSelect, - SignInOneTimeTokenPayload, + DisconnectAccountPayloadSelect, + DisconnectAccountPayload, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { SignInOneTimeTokenVariables } from '../../orm/mutation'; -export type { SignInOneTimeTokenPayloadSelect } from '../../orm/input-types'; -export function useSignInOneTimeTokenMutation( +export type { DisconnectAccountVariables } from '../../orm/mutation'; +export type { DisconnectAccountPayloadSelect } from '../../orm/input-types'; +export function useDisconnectAccountMutation( params: { selection: { - fields: S & SignInOneTimeTokenPayloadSelect; - } & HookStrictSelect, SignInOneTimeTokenPayloadSelect>; + fields: S & DisconnectAccountPayloadSelect; + } & HookStrictSelect, DisconnectAccountPayloadSelect>; } & Omit< UseMutationOptions< { - signInOneTimeToken: InferSelectResult | null; + disconnectAccount: InferSelectResult | null; }, Error, - SignInOneTimeTokenVariables + DisconnectAccountVariables >, 'mutationFn' > ): UseMutationResult< { - signInOneTimeToken: InferSelectResult | null; + disconnectAccount: InferSelectResult | null; }, Error, - SignInOneTimeTokenVariables + DisconnectAccountVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.signInOneTimeToken(), - mutationFn: (variables: SignInOneTimeTokenVariables) => + mutationKey: customMutationKeys.disconnectAccount(), + mutationFn: (variables: DisconnectAccountVariables) => getClient() - .mutation.signInOneTimeToken(variables, { + .mutation.disconnectAccount(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useProvisionNewUserMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useProvisionNewUserMutation.ts new file mode 100644 index 000000000..24964f5a6 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useProvisionNewUserMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for provisionNewUser + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { ProvisionNewUserVariables } from '../../orm/mutation'; +import type { ProvisionNewUserPayloadSelect, ProvisionNewUserPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { ProvisionNewUserVariables } from '../../orm/mutation'; +export type { ProvisionNewUserPayloadSelect } from '../../orm/input-types'; +export function useProvisionNewUserMutation( + params: { + selection: { + fields: S & ProvisionNewUserPayloadSelect; + } & HookStrictSelect, ProvisionNewUserPayloadSelect>; + } & Omit< + UseMutationOptions< + { + provisionNewUser: InferSelectResult | null; + }, + Error, + ProvisionNewUserVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + provisionNewUser: InferSelectResult | null; + }, + Error, + ProvisionNewUserVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.provisionNewUser(), + mutationFn: (variables: ProvisionNewUserVariables) => + getClient() + .mutation.provisionNewUser(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useRequestCrossOriginTokenMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useRequestCrossOriginTokenMutation.ts new file mode 100644 index 000000000..e8575a3fa --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useRequestCrossOriginTokenMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for requestCrossOriginToken + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { RequestCrossOriginTokenVariables } from '../../orm/mutation'; +import type { + RequestCrossOriginTokenPayloadSelect, + RequestCrossOriginTokenPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { RequestCrossOriginTokenVariables } from '../../orm/mutation'; +export type { RequestCrossOriginTokenPayloadSelect } from '../../orm/input-types'; +export function useRequestCrossOriginTokenMutation( + params: { + selection: { + fields: S & RequestCrossOriginTokenPayloadSelect; + } & HookStrictSelect, RequestCrossOriginTokenPayloadSelect>; + } & Omit< + UseMutationOptions< + { + requestCrossOriginToken: InferSelectResult | null; + }, + Error, + RequestCrossOriginTokenVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + requestCrossOriginToken: InferSelectResult | null; + }, + Error, + RequestCrossOriginTokenVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.requestCrossOriginToken(), + mutationFn: (variables: RequestCrossOriginTokenVariables) => + getClient() + .mutation.requestCrossOriginToken(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useOneTimeTokenMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useRevokeApiKeyMutation.ts similarity index 55% rename from sdk/constructive-react/src/public/hooks/mutations/useOneTimeTokenMutation.ts rename to sdk/constructive-react/src/auth/hooks/mutations/useRevokeApiKeyMutation.ts index 0215b7d08..68641999a 100644 --- a/sdk/constructive-react/src/public/hooks/mutations/useOneTimeTokenMutation.ts +++ b/sdk/constructive-react/src/auth/hooks/mutations/useRevokeApiKeyMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for oneTimeToken + * Custom mutation hook for revokeApiKey * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -10,45 +10,45 @@ import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; -import type { OneTimeTokenVariables } from '../../orm/mutation'; -import type { OneTimeTokenPayloadSelect, OneTimeTokenPayload } from '../../orm/input-types'; +import type { RevokeApiKeyVariables } from '../../orm/mutation'; +import type { RevokeApiKeyPayloadSelect, RevokeApiKeyPayload } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { OneTimeTokenVariables } from '../../orm/mutation'; -export type { OneTimeTokenPayloadSelect } from '../../orm/input-types'; -export function useOneTimeTokenMutation( +export type { RevokeApiKeyVariables } from '../../orm/mutation'; +export type { RevokeApiKeyPayloadSelect } from '../../orm/input-types'; +export function useRevokeApiKeyMutation( params: { selection: { - fields: S & OneTimeTokenPayloadSelect; - } & HookStrictSelect, OneTimeTokenPayloadSelect>; + fields: S & RevokeApiKeyPayloadSelect; + } & HookStrictSelect, RevokeApiKeyPayloadSelect>; } & Omit< UseMutationOptions< { - oneTimeToken: InferSelectResult | null; + revokeApiKey: InferSelectResult | null; }, Error, - OneTimeTokenVariables + RevokeApiKeyVariables >, 'mutationFn' > ): UseMutationResult< { - oneTimeToken: InferSelectResult | null; + revokeApiKey: InferSelectResult | null; }, Error, - OneTimeTokenVariables + RevokeApiKeyVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.oneTimeToken(), - mutationFn: (variables: OneTimeTokenVariables) => + mutationKey: customMutationKeys.revokeApiKey(), + mutationFn: (variables: RevokeApiKeyVariables) => getClient() - .mutation.oneTimeToken(variables, { + .mutation.revokeApiKey(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useRevokeSessionMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useRevokeSessionMutation.ts new file mode 100644 index 000000000..773e73c5f --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/mutations/useRevokeSessionMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for revokeSession + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { RevokeSessionVariables } from '../../orm/mutation'; +import type { RevokeSessionPayloadSelect, RevokeSessionPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { RevokeSessionVariables } from '../../orm/mutation'; +export type { RevokeSessionPayloadSelect } from '../../orm/input-types'; +export function useRevokeSessionMutation( + params: { + selection: { + fields: S & RevokeSessionPayloadSelect; + } & HookStrictSelect, RevokeSessionPayloadSelect>; + } & Omit< + UseMutationOptions< + { + revokeSession: InferSelectResult | null; + }, + Error, + RevokeSessionVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + revokeSession: InferSelectResult | null; + }, + Error, + RevokeSessionVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.revokeSession(), + mutationFn: (variables: RevokeSessionVariables) => + getClient() + .mutation.revokeSession(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useSignInOneTimeTokenMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useSignInCrossOriginMutation.ts similarity index 51% rename from sdk/constructive-react/src/auth/hooks/mutations/useSignInOneTimeTokenMutation.ts rename to sdk/constructive-react/src/auth/hooks/mutations/useSignInCrossOriginMutation.ts index 2485fe1a6..8afc11454 100644 --- a/sdk/constructive-react/src/auth/hooks/mutations/useSignInOneTimeTokenMutation.ts +++ b/sdk/constructive-react/src/auth/hooks/mutations/useSignInCrossOriginMutation.ts @@ -1,5 +1,5 @@ /** - * Custom mutation hook for signInOneTimeToken + * Custom mutation hook for signInCrossOrigin * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -10,48 +10,48 @@ import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; import { customMutationKeys } from '../mutation-keys'; -import type { SignInOneTimeTokenVariables } from '../../orm/mutation'; +import type { SignInCrossOriginVariables } from '../../orm/mutation'; import type { - SignInOneTimeTokenPayloadSelect, - SignInOneTimeTokenPayload, + SignInCrossOriginPayloadSelect, + SignInCrossOriginPayload, } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; -export type { SignInOneTimeTokenVariables } from '../../orm/mutation'; -export type { SignInOneTimeTokenPayloadSelect } from '../../orm/input-types'; -export function useSignInOneTimeTokenMutation( +export type { SignInCrossOriginVariables } from '../../orm/mutation'; +export type { SignInCrossOriginPayloadSelect } from '../../orm/input-types'; +export function useSignInCrossOriginMutation( params: { selection: { - fields: S & SignInOneTimeTokenPayloadSelect; - } & HookStrictSelect, SignInOneTimeTokenPayloadSelect>; + fields: S & SignInCrossOriginPayloadSelect; + } & HookStrictSelect, SignInCrossOriginPayloadSelect>; } & Omit< UseMutationOptions< { - signInOneTimeToken: InferSelectResult | null; + signInCrossOrigin: InferSelectResult | null; }, Error, - SignInOneTimeTokenVariables + SignInCrossOriginVariables >, 'mutationFn' > ): UseMutationResult< { - signInOneTimeToken: InferSelectResult | null; + signInCrossOrigin: InferSelectResult | null; }, Error, - SignInOneTimeTokenVariables + SignInCrossOriginVariables > { const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; return useMutation({ - mutationKey: customMutationKeys.signInOneTimeToken(), - mutationFn: (variables: SignInOneTimeTokenVariables) => + mutationKey: customMutationKeys.signInCrossOrigin(), + mutationFn: (variables: SignInCrossOriginVariables) => getClient() - .mutation.signInOneTimeToken(variables, { + .mutation.signInCrossOrigin(variables, { select: args.select, } as { select: S; - } & StrictSelect) + } & StrictSelect) .unwrap(), ...mutationOptions, }); diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useUpdateConnectedAccountMutation.ts b/sdk/constructive-react/src/auth/hooks/mutations/useUpdateConnectedAccountMutation.ts deleted file mode 100644 index 3615b7022..000000000 --- a/sdk/constructive-react/src/auth/hooks/mutations/useUpdateConnectedAccountMutation.ts +++ /dev/null @@ -1,116 +0,0 @@ -/** - * OAuth and social login connections linking external service accounts to users - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { connectedAccountKeys } from '../query-keys'; -import { connectedAccountMutationKeys } from '../mutation-keys'; -import type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - ConnectedAccountPatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - ConnectedAccountPatch, -} from '../../orm/input-types'; -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdateConnectedAccountMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', connectedAccountPatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdateConnectedAccountMutation( - params: { - selection: { - fields: S & ConnectedAccountSelect; - } & HookStrictSelect, ConnectedAccountSelect>; - } & Omit< - UseMutationOptions< - { - updateConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }, - Error, - { - id: string; - connectedAccountPatch: ConnectedAccountPatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updateConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }, - Error, - { - id: string; - connectedAccountPatch: ConnectedAccountPatch; - } ->; -export function useUpdateConnectedAccountMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - connectedAccountPatch: ConnectedAccountPatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: connectedAccountMutationKeys.all, - mutationFn: ({ - id, - connectedAccountPatch, - }: { - id: string; - connectedAccountPatch: ConnectedAccountPatch; - }) => - getClient() - .connectedAccount.update({ - where: { - id, - }, - data: connectedAccountPatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/auth/hooks/queries/index.ts b/sdk/constructive-react/src/auth/hooks/queries/index.ts index 15e2bdc50..0a85a98e3 100644 --- a/sdk/constructive-react/src/auth/hooks/queries/index.ts +++ b/sdk/constructive-react/src/auth/hooks/queries/index.ts @@ -9,15 +9,16 @@ export * from './usePhoneNumbersQuery'; export * from './usePhoneNumberQuery'; export * from './useCryptoAddressesQuery'; export * from './useCryptoAddressQuery'; -export * from './useConnectedAccountsQuery'; -export * from './useConnectedAccountQuery'; export * from './useAuditLogsQuery'; export * from './useAuditLogQuery'; export * from './useRoleTypesQuery'; export * from './useRoleTypeQuery'; +export * from './useUserConnectedAccountsQuery'; +export * from './useUserConnectedAccountQuery'; export * from './useUsersQuery'; export * from './useUserQuery'; -export * from './useCurrentIpAddressQuery'; export * from './useCurrentUserAgentQuery'; +export * from './useCurrentIpAddressQuery'; export * from './useCurrentUserIdQuery'; +export * from './useRequireStepUpQuery'; export * from './useCurrentUserQuery'; diff --git a/sdk/constructive-react/src/auth/hooks/queries/useConnectedAccountQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useConnectedAccountQuery.ts deleted file mode 100644 index 913b660d4..000000000 --- a/sdk/constructive-react/src/auth/hooks/queries/useConnectedAccountQuery.ts +++ /dev/null @@ -1,138 +0,0 @@ -/** - * OAuth and social login connections linking external service accounts to users - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useQuery } from '@tanstack/react-query'; -import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { connectedAccountKeys } from '../query-keys'; -import type { ConnectedAccountSelect, ConnectedAccountWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ConnectedAccountSelect, ConnectedAccountWithRelations } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const connectedAccountQueryKey = connectedAccountKeys.detail; -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```tsx - * const { data, isLoading } = useConnectedAccountQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useConnectedAccountQuery< - S extends ConnectedAccountSelect, - TData = { - connectedAccount: InferSelectResult | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, ConnectedAccountSelect>; - } & Omit< - UseQueryOptions< - { - connectedAccount: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useConnectedAccountQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: connectedAccountKeys.detail(params.id), - queryFn: () => - getClient() - .connectedAccount.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```ts - * const data = await fetchConnectedAccountQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchConnectedAccountQuery(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, ConnectedAccountSelect>; -}): Promise<{ - connectedAccount: InferSelectResult | null; -}>; -export async function fetchConnectedAccountQuery(params: { - id: string; - selection: SelectionConfig; -}) { - const args = buildSelectionArgs(params.selection); - return getClient() - .connectedAccount.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```ts - * await prefetchConnectedAccountQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchConnectedAccountQuery( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, ConnectedAccountSelect>; - } -): Promise; -export async function prefetchConnectedAccountQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: connectedAccountKeys.detail(params.id), - queryFn: () => - getClient() - .connectedAccount.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/auth/hooks/queries/useConnectedAccountsQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useConnectedAccountsQuery.ts deleted file mode 100644 index b75ee2f80..000000000 --- a/sdk/constructive-react/src/auth/hooks/queries/useConnectedAccountsQuery.ts +++ /dev/null @@ -1,163 +0,0 @@ -/** - * OAuth and social login connections linking external service accounts to users - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useQuery } from '@tanstack/react-query'; -import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildListSelectionArgs } from '../selection'; -import type { ListSelectionConfig } from '../selection'; -import { connectedAccountKeys } from '../query-keys'; -import type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - ConnectedAccountFilter, - ConnectedAccountOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - ConnectedAccountFilter, - ConnectedAccountOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const connectedAccountsQueryKey = connectedAccountKeys.list; -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```tsx - * const { data, isLoading } = useConnectedAccountsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useConnectedAccountsQuery< - S extends ConnectedAccountSelect, - TData = { - connectedAccounts: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ConnectedAccountSelect>; - } & Omit< - UseQueryOptions< - { - connectedAccounts: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useConnectedAccountsQuery( - params: { - selection: ListSelectionConfig< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: connectedAccountKeys.list(args), - queryFn: () => getClient().connectedAccount.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```ts - * const data = await fetchConnectedAccountsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchConnectedAccountsQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ConnectedAccountSelect>; -}): Promise<{ - connectedAccounts: ConnectionResult>; -}>; -export async function fetchConnectedAccountsQuery(params: { - selection: ListSelectionConfig< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >; -}) { - const args = buildListSelectionArgs< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >(params.selection); - return getClient().connectedAccount.findMany(args).unwrap(); -} -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```ts - * await prefetchConnectedAccountsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchConnectedAccountsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ConnectedAccountSelect>; - } -): Promise; -export async function prefetchConnectedAccountsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: connectedAccountKeys.list(args), - queryFn: () => getClient().connectedAccount.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/auth/hooks/queries/useRequireStepUpQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useRequireStepUpQuery.ts new file mode 100644 index 000000000..115b29a85 --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/useRequireStepUpQuery.ts @@ -0,0 +1,105 @@ +/** + * Custom query hook for requireStepUp + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customQueryKeys } from '../query-keys'; +import type { RequireStepUpVariables } from '../../orm/query'; +export type { RequireStepUpVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const requireStepUpQueryKey = customQueryKeys.requireStepUp; +/** + * Query hook for requireStepUp + * + * @example + * ```tsx + * const { data, isLoading } = useRequireStepUpQuery({ variables: { stepUpType } }); + * + * if (data?.requireStepUp) { + * console.log(data.requireStepUp); + * } + * ``` + */ +export function useRequireStepUpQuery< + TData = { + requireStepUp: boolean | null; + }, +>( + params?: { + variables?: RequireStepUpVariables; + } & Omit< + UseQueryOptions< + { + requireStepUp: boolean | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useRequireStepUpQuery< + TData = { + requireStepUp: boolean | null; + }, +>( + params?: { + variables?: RequireStepUpVariables; + } & Omit< + UseQueryOptions< + { + requireStepUp: boolean | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: requireStepUpQueryKey(variables), + queryFn: () => getClient().query.requireStepUp(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch requireStepUp without React hooks + * + * @example + * ```ts + * const data = await fetchRequireStepUpQuery({ variables: { stepUpType } }); + * ``` + */ +export async function fetchRequireStepUpQuery(params?: { variables?: RequireStepUpVariables }) { + const variables = params?.variables ?? {}; + return getClient().query.requireStepUp(variables).unwrap(); +} +/** + * Prefetch requireStepUp for SSR or cache warming + * + * @example + * ```ts + * await prefetchRequireStepUpQuery(queryClient, { variables: { stepUpType } }); + * ``` + */ +export async function prefetchRequireStepUpQuery( + queryClient: QueryClient, + params?: { + variables?: RequireStepUpVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: requireStepUpQueryKey(variables), + queryFn: () => getClient().query.requireStepUp(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/useUserConnectedAccountQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useUserConnectedAccountQuery.ts new file mode 100644 index 000000000..1008f06ca --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/useUserConnectedAccountQuery.ts @@ -0,0 +1,144 @@ +/** + * Single item query hook for UserConnectedAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { userConnectedAccountKeys } from '../query-keys'; +import type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const userConnectedAccountQueryKey = userConnectedAccountKeys.detail; +/** + * Query hook for fetching a single UserConnectedAccount + * + * @example + * ```tsx + * const { data, isLoading } = useUserConnectedAccountQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useUserConnectedAccountQuery< + S extends UserConnectedAccountSelect, + TData = { + userConnectedAccount: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserConnectedAccountSelect>; + } & Omit< + UseQueryOptions< + { + userConnectedAccount: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useUserConnectedAccountQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: userConnectedAccountKeys.detail(params.id), + queryFn: () => + getClient() + .userConnectedAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single UserConnectedAccount without React hooks + * + * @example + * ```ts + * const data = await fetchUserConnectedAccountQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchUserConnectedAccountQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserConnectedAccountSelect>; +}): Promise<{ + userConnectedAccount: InferSelectResult | null; +}>; +export async function fetchUserConnectedAccountQuery(params: { + id: string; + selection: SelectionConfig; +}) { + const args = buildSelectionArgs(params.selection); + return getClient() + .userConnectedAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single UserConnectedAccount for SSR or cache warming + * + * @example + * ```ts + * await prefetchUserConnectedAccountQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchUserConnectedAccountQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserConnectedAccountSelect>; + } +): Promise; +export async function prefetchUserConnectedAccountQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: userConnectedAccountKeys.detail(params.id), + queryFn: () => + getClient() + .userConnectedAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/queries/useUserConnectedAccountsQuery.ts b/sdk/constructive-react/src/auth/hooks/queries/useUserConnectedAccountsQuery.ts new file mode 100644 index 000000000..f4e42d7af --- /dev/null +++ b/sdk/constructive-react/src/auth/hooks/queries/useUserConnectedAccountsQuery.ts @@ -0,0 +1,178 @@ +/** + * List query hook for UserConnectedAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { userConnectedAccountKeys } from '../query-keys'; +import type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const userConnectedAccountsQueryKey = userConnectedAccountKeys.list; +/** + * Query hook for fetching UserConnectedAccount list + * + * @example + * ```tsx + * const { data, isLoading } = useUserConnectedAccountsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useUserConnectedAccountsQuery< + S extends UserConnectedAccountSelect, + TData = { + userConnectedAccounts: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserConnectedAccountSelect>; + } & Omit< + UseQueryOptions< + { + userConnectedAccounts: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useUserConnectedAccountsQuery( + params: { + selection: ListSelectionConfig< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: userConnectedAccountKeys.list(args), + queryFn: () => getClient().userConnectedAccount.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch UserConnectedAccount list without React hooks + * + * @example + * ```ts + * const data = await fetchUserConnectedAccountsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchUserConnectedAccountsQuery< + S extends UserConnectedAccountSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserConnectedAccountSelect>; +}): Promise<{ + userConnectedAccounts: ConnectionResult>; +}>; +export async function fetchUserConnectedAccountsQuery(params: { + selection: ListSelectionConfig< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >; +}) { + const args = buildListSelectionArgs< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >(params.selection); + return getClient().userConnectedAccount.findMany(args).unwrap(); +} +/** + * Prefetch UserConnectedAccount list for SSR or cache warming + * + * @example + * ```ts + * await prefetchUserConnectedAccountsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchUserConnectedAccountsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserConnectedAccountSelect>; + } +): Promise; +export async function prefetchUserConnectedAccountsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: userConnectedAccountKeys.list(args), + queryFn: () => getClient().userConnectedAccount.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/query-keys.ts b/sdk/constructive-react/src/auth/hooks/query-keys.ts index 7f9191326..69a6ff14c 100644 --- a/sdk/constructive-react/src/auth/hooks/query-keys.ts +++ b/sdk/constructive-react/src/auth/hooks/query-keys.ts @@ -46,15 +46,6 @@ export const cryptoAddressKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...cryptoAddressKeys.details(), id] as const, } as const; -export const connectedAccountKeys = { - /** All connectedAccount queries */ all: ['connectedaccount'] as const, - /** List query keys */ lists: () => [...connectedAccountKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...connectedAccountKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...connectedAccountKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...connectedAccountKeys.details(), id] as const, -} as const; export const auditLogKeys = { /** All auditLog queries */ all: ['auditlog'] as const, /** List query keys */ lists: () => [...auditLogKeys.all, 'list'] as const, @@ -73,6 +64,15 @@ export const roleTypeKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...roleTypeKeys.details(), id] as const, } as const; +export const userConnectedAccountKeys = { + /** All userConnectedAccount queries */ all: ['userconnectedaccount'] as const, + /** List query keys */ lists: () => [...userConnectedAccountKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...userConnectedAccountKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...userConnectedAccountKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...userConnectedAccountKeys.details(), id] as const, +} as const; export const userKeys = { /** All user queries */ all: ['user'] as const, /** List query keys */ lists: () => [...userKeys.all, 'list'] as const, @@ -88,9 +88,11 @@ export const userKeys = { // ============================================================================ export const customQueryKeys = { - /** Query key for currentIpAddress */ currentIpAddress: () => ['currentIpAddress'] as const, /** Query key for currentUserAgent */ currentUserAgent: () => ['currentUserAgent'] as const, + /** Query key for currentIpAddress */ currentIpAddress: () => ['currentIpAddress'] as const, /** Query key for currentUserId */ currentUserId: () => ['currentUserId'] as const, + /** Query key for requireStepUp */ requireStepUp: (variables?: object) => + ['requireStepUp', variables] as const, /** Query key for currentUser */ currentUser: () => ['currentUser'] as const, } as const; /** @@ -119,9 +121,9 @@ export const queryKeys = { email: emailKeys, phoneNumber: phoneNumberKeys, cryptoAddress: cryptoAddressKeys, - connectedAccount: connectedAccountKeys, auditLog: auditLogKeys, roleType: roleTypeKeys, + userConnectedAccount: userConnectedAccountKeys, user: userKeys, custom: customQueryKeys, } as const; diff --git a/sdk/constructive-react/src/auth/orm/README.md b/sdk/constructive-react/src/auth/orm/README.md index 4160a6350..9f1277067 100644 --- a/sdk/constructive-react/src/auth/orm/README.md +++ b/sdk/constructive-react/src/auth/orm/README.md @@ -24,9 +24,9 @@ const db = createClient({ | `email` | findMany, findOne, create, update, delete | | `phoneNumber` | findMany, findOne, create, update, delete | | `cryptoAddress` | findMany, findOne, create, update, delete | -| `connectedAccount` | findMany, findOne, create, update, delete | | `auditLog` | findMany, findOne, create, update, delete | | `roleType` | findMany, findOne, create, update, delete | +| `userConnectedAccount` | findMany, findOne, create, update, delete | | `user` | findMany, findOne, create, update, delete | ## Table Operations @@ -137,42 +137,6 @@ const updated = await db.cryptoAddress.update({ where: { id: '' }, data: { const deleted = await db.cryptoAddress.delete({ where: { id: '' } }).execute(); ``` -### `db.connectedAccount` - -CRUD operations for ConnectedAccount records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | UUID | No | -| `ownerId` | UUID | Yes | -| `service` | String | Yes | -| `identifier` | String | Yes | -| `details` | JSON | Yes | -| `isVerified` | Boolean | Yes | -| `createdAt` | Datetime | No | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all connectedAccount records -const items = await db.connectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.connectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Create -const created = await db.connectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.connectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.connectedAccount.delete({ where: { id: '' } }).execute(); -``` - ### `db.auditLog` CRUD operations for AuditLog records. @@ -239,6 +203,42 @@ const updated = await db.roleType.update({ where: { id: '' }, data: { name: const deleted = await db.roleType.delete({ where: { id: '' } }).execute(); ``` +### `db.userConnectedAccount` + +CRUD operations for UserConnectedAccount records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `ownerId` | UUID | Yes | +| `service` | String | Yes | +| `identifier` | String | Yes | +| `details` | JSON | Yes | +| `isVerified` | Boolean | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all userConnectedAccount records +const items = await db.userConnectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.userConnectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.userConnectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userConnectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userConnectedAccount.delete({ where: { id: '' } }).execute(); +``` + ### `db.user` CRUD operations for User records. @@ -283,26 +283,26 @@ const deleted = await db.user.delete({ where: { id: '' } }).execute(); ## Custom Operations -### `db.query.currentIpAddress` +### `db.query.currentUserAgent` -currentIpAddress +currentUserAgent - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentIpAddress().execute(); +const result = await db.query.currentUserAgent().execute(); ``` -### `db.query.currentUserAgent` +### `db.query.currentIpAddress` -currentUserAgent +currentIpAddress - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentUserAgent().execute(); +const result = await db.query.currentIpAddress().execute(); ``` ### `db.query.currentUserId` @@ -316,6 +316,21 @@ currentUserId const result = await db.query.currentUserId().execute(); ``` +### `db.query.requireStepUp` + +requireStepUp + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `stepUpType` | String | + +```typescript +const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); +``` + ### `db.query.currentUser` currentUser @@ -372,6 +387,51 @@ checkPassword const result = await db.mutation.checkPassword({ input: { password: '' } }).execute(); ``` +### `db.mutation.disconnectAccount` + +disconnectAccount + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DisconnectAccountInput (required) | + +```typescript +const result = await db.mutation.disconnectAccount({ input: { accountId: '' } }).execute(); +``` + +### `db.mutation.revokeApiKey` + +revokeApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeApiKeyInput (required) | + +```typescript +const result = await db.mutation.revokeApiKey({ input: { keyId: '' } }).execute(); +``` + +### `db.mutation.revokeSession` + +revokeSession + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeSessionInput (required) | + +```typescript +const result = await db.mutation.revokeSession({ input: { sessionId: '' } }).execute(); +``` + ### `db.mutation.verifyPassword` verifyPassword @@ -447,6 +507,21 @@ verifyEmail const result = await db.mutation.verifyEmail({ input: { emailId: '', token: '' } }).execute(); ``` +### `db.mutation.provisionNewUser` + +provisionNewUser + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionNewUserInput (required) | + +```typescript +const result = await db.mutation.provisionNewUser({ input: { email: '', password: '' } }).execute(); +``` + ### `db.mutation.resetPassword` resetPassword @@ -462,34 +537,34 @@ resetPassword const result = await db.mutation.resetPassword({ input: { roleId: '', resetToken: '', newPassword: '' } }).execute(); ``` -### `db.mutation.signInOneTimeToken` +### `db.mutation.createApiKey` -signInOneTimeToken +createApiKey - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInOneTimeTokenInput (required) | + | `input` | CreateApiKeyInput (required) | ```typescript -const result = await db.mutation.signInOneTimeToken({ input: { token: '', credentialKind: '' } }).execute(); +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }).execute(); ``` -### `db.mutation.signIn` +### `db.mutation.signInCrossOrigin` -signIn +signInCrossOrigin - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInInput (required) | + | `input` | SignInCrossOriginInput (required) | ```typescript -const result = await db.mutation.signIn({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.signInCrossOrigin({ input: { token: '', credentialKind: '' } }).execute(); ``` ### `db.mutation.signUp` @@ -507,19 +582,34 @@ signUp const result = await db.mutation.signUp({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); ``` -### `db.mutation.oneTimeToken` +### `db.mutation.requestCrossOriginToken` -oneTimeToken +requestCrossOriginToken - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | OneTimeTokenInput (required) | + | `input` | RequestCrossOriginTokenInput (required) | + +```typescript +const result = await db.mutation.requestCrossOriginToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +``` + +### `db.mutation.signIn` + +signIn + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SignInInput (required) | ```typescript -const result = await db.mutation.oneTimeToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +const result = await db.mutation.signIn({ input: '' }).execute(); ``` ### `db.mutation.extendTokenExpires` diff --git a/sdk/constructive-react/src/auth/orm/index.ts b/sdk/constructive-react/src/auth/orm/index.ts index 3c0f903f5..d8c43241b 100644 --- a/sdk/constructive-react/src/auth/orm/index.ts +++ b/sdk/constructive-react/src/auth/orm/index.ts @@ -8,9 +8,9 @@ import type { OrmClientConfig } from './client'; import { EmailModel } from './models/email'; import { PhoneNumberModel } from './models/phoneNumber'; import { CryptoAddressModel } from './models/cryptoAddress'; -import { ConnectedAccountModel } from './models/connectedAccount'; import { AuditLogModel } from './models/auditLog'; import { RoleTypeModel } from './models/roleType'; +import { UserConnectedAccountModel } from './models/userConnectedAccount'; import { UserModel } from './models/user'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; @@ -50,9 +50,9 @@ export function createClient(config: OrmClientConfig) { email: new EmailModel(client), phoneNumber: new PhoneNumberModel(client), cryptoAddress: new CryptoAddressModel(client), - connectedAccount: new ConnectedAccountModel(client), auditLog: new AuditLogModel(client), roleType: new RoleTypeModel(client), + userConnectedAccount: new UserConnectedAccountModel(client), user: new UserModel(client), query: createQueryOperations(client), mutation: createMutationOperations(client), diff --git a/sdk/constructive-react/src/auth/orm/input-types.ts b/sdk/constructive-react/src/auth/orm/input-types.ts index 968dafb03..563c6ae79 100644 --- a/sdk/constructive-react/src/auth/orm/input-types.ts +++ b/sdk/constructive-react/src/auth/orm/input-types.ts @@ -276,21 +276,6 @@ export interface CryptoAddress { createdAt?: string | null; updatedAt?: string | null; } -/** OAuth and social login connections linking external service accounts to users */ -export interface ConnectedAccount { - id: string; - ownerId?: string | null; - /** The service used, e.g. `twitter` or `github`. */ - service?: string | null; - /** A unique identifier for the user within the service */ - identifier?: string | null; - /** Additional profile details extracted from this login method */ - details?: Record | null; - /** Whether this connected account has been verified */ - isVerified?: boolean | null; - createdAt?: string | null; - updatedAt?: string | null; -} /** Append-only audit log of authentication events (sign-in, sign-up, password changes, etc.) */ export interface AuditLog { id: string; @@ -313,6 +298,16 @@ export interface RoleType { id: number; name?: string | null; } +export interface UserConnectedAccount { + id: string; + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; + createdAt?: string | null; + updatedAt?: string | null; +} export interface User { id: string; username?: string | null; @@ -351,28 +346,26 @@ export interface PhoneNumberRelations { export interface CryptoAddressRelations { owner?: User | null; } -export interface ConnectedAccountRelations { - owner?: User | null; -} export interface AuditLogRelations { actor?: User | null; } export interface RoleTypeRelations {} +export interface UserConnectedAccountRelations {} export interface UserRelations { roleType?: RoleType | null; ownedEmails?: ConnectionResult; ownedPhoneNumbers?: ConnectionResult; ownedCryptoAddresses?: ConnectionResult; - ownedConnectedAccounts?: ConnectionResult; auditLogsByActorId?: ConnectionResult; } // ============ Entity Types With Relations ============ export type EmailWithRelations = Email & EmailRelations; export type PhoneNumberWithRelations = PhoneNumber & PhoneNumberRelations; export type CryptoAddressWithRelations = CryptoAddress & CryptoAddressRelations; -export type ConnectedAccountWithRelations = ConnectedAccount & ConnectedAccountRelations; export type AuditLogWithRelations = AuditLog & AuditLogRelations; export type RoleTypeWithRelations = RoleType & RoleTypeRelations; +export type UserConnectedAccountWithRelations = UserConnectedAccount & + UserConnectedAccountRelations; export type UserWithRelations = User & UserRelations; // ============ Entity Select Types ============ export type EmailSelect = { @@ -412,19 +405,6 @@ export type CryptoAddressSelect = { select: UserSelect; }; }; -export type ConnectedAccountSelect = { - id?: boolean; - ownerId?: boolean; - service?: boolean; - identifier?: boolean; - details?: boolean; - isVerified?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - owner?: { - select: UserSelect; - }; -}; export type AuditLogSelect = { id?: boolean; event?: boolean; @@ -442,6 +422,16 @@ export type RoleTypeSelect = { id?: boolean; name?: boolean; }; +export type UserConnectedAccountSelect = { + id?: boolean; + ownerId?: boolean; + service?: boolean; + identifier?: boolean; + details?: boolean; + isVerified?: boolean; + createdAt?: boolean; + updatedAt?: boolean; +}; export type UserSelect = { id?: boolean; username?: boolean; @@ -475,12 +465,6 @@ export type UserSelect = { filter?: CryptoAddressFilter; orderBy?: CryptoAddressOrderBy[]; }; - ownedConnectedAccounts?: { - select: ConnectedAccountSelect; - first?: number; - filter?: ConnectedAccountFilter; - orderBy?: ConnectedAccountOrderBy[]; - }; auditLogsByActorId?: { select: AuditLogSelect; first?: number; @@ -563,32 +547,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} export interface AuditLogFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -629,6 +587,30 @@ export interface RoleTypeFilter { /** Negates the expression. */ not?: RoleTypeFilter; } +export interface UserConnectedAccountFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `service` field. */ + service?: StringFilter; + /** Filter by the object’s `identifier` field. */ + identifier?: StringFilter; + /** Filter by the object’s `details` field. */ + details?: JSONFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: UserConnectedAccountFilter[]; + /** Checks for any expressions in this list. */ + or?: UserConnectedAccountFilter[]; + /** Negates the expression. */ + not?: UserConnectedAccountFilter; +} export interface UserFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -666,10 +648,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `auditLogsByActorId` relation. */ auditLogsByActorId?: UserToManyAuditLogFilter; /** `auditLogsByActorId` exist. */ @@ -743,26 +721,6 @@ export type CryptoAddressOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ConnectedAccountOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SERVICE_ASC' - | 'SERVICE_DESC' - | 'IDENTIFIER_ASC' - | 'IDENTIFIER_DESC' - | 'DETAILS_ASC' - | 'DETAILS_DESC' - | 'IS_VERIFIED_ASC' - | 'IS_VERIFIED_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type AuditLogOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -791,6 +749,24 @@ export type RoleTypeOrderBy = | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC'; +export type UserConnectedAccountOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SERVICE_ASC' + | 'SERVICE_DESC' + | 'IDENTIFIER_ASC' + | 'IDENTIFIER_DESC' + | 'DETAILS_ASC' + | 'DETAILS_DESC' + | 'IS_VERIFIED_ASC' + | 'IS_VERIFIED_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type UserOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -892,32 +868,6 @@ export interface DeleteCryptoAddressInput { clientMutationId?: string; id: string; } -export interface CreateConnectedAccountInput { - clientMutationId?: string; - connectedAccount: { - ownerId?: string; - service: string; - identifier: string; - details: Record; - isVerified?: boolean; - }; -} -export interface ConnectedAccountPatch { - ownerId?: string | null; - service?: string | null; - identifier?: string | null; - details?: Record | null; - isVerified?: boolean | null; -} -export interface UpdateConnectedAccountInput { - clientMutationId?: string; - id: string; - connectedAccountPatch: ConnectedAccountPatch; -} -export interface DeleteConnectedAccountInput { - clientMutationId?: string; - id: string; -} export interface CreateAuditLogInput { clientMutationId?: string; auditLog: { @@ -964,6 +914,32 @@ export interface DeleteRoleTypeInput { clientMutationId?: string; id: number; } +export interface CreateUserConnectedAccountInput { + clientMutationId?: string; + userConnectedAccount: { + ownerId?: string; + service?: string; + identifier?: string; + details?: Record; + isVerified?: boolean; + }; +} +export interface UserConnectedAccountPatch { + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; +} +export interface UpdateUserConnectedAccountInput { + clientMutationId?: string; + id: string; + userConnectedAccountPatch: UserConnectedAccountPatch; +} +export interface DeleteUserConnectedAccountInput { + clientMutationId?: string; + id: string; +} export interface CreateUserInput { clientMutationId?: string; user: { @@ -995,7 +971,6 @@ export const connectionFieldsMap = { ownedEmails: 'Email', ownedPhoneNumbers: 'PhoneNumber', ownedCryptoAddresses: 'CryptoAddress', - ownedConnectedAccounts: 'ConnectedAccount', auditLogsByActorId: 'AuditLog', }, } as Record>; @@ -1010,6 +985,18 @@ export interface CheckPasswordInput { clientMutationId?: string; password?: string; } +export interface DisconnectAccountInput { + clientMutationId?: string; + accountId: string; +} +export interface RevokeApiKeyInput { + clientMutationId?: string; + keyId: string; +} +export interface RevokeSessionInput { + clientMutationId?: string; + sessionId: string; +} export interface VerifyPasswordInput { clientMutationId?: string; password: string; @@ -1033,18 +1020,29 @@ export interface VerifyEmailInput { emailId?: string; token?: string; } +export interface ProvisionNewUserInput { + clientMutationId?: string; + email?: string; + password?: string; +} export interface ResetPasswordInput { clientMutationId?: string; roleId?: string; resetToken?: string; newPassword?: string; } -export interface SignInOneTimeTokenInput { +export interface CreateApiKeyInput { + clientMutationId?: string; + keyName: string; + accessLevel?: string; + mfaLevel?: string; +} +export interface SignInCrossOriginInput { clientMutationId?: string; token?: string; credentialKind?: string; } -export interface SignInInput { +export interface SignUpInput { clientMutationId?: string; email?: string; password?: string; @@ -1052,20 +1050,21 @@ export interface SignInInput { credentialKind?: string; csrfToken?: string; } -export interface SignUpInput { +export interface RequestCrossOriginTokenInput { clientMutationId?: string; email?: string; password?: string; + origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; - credentialKind?: string; - csrfToken?: string; } -export interface OneTimeTokenInput { +export interface SignInInput { clientMutationId?: string; email?: string; password?: string; - origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; + credentialKind?: string; + csrfToken?: string; + deviceToken?: string; } export interface ExtendTokenExpiresInput { clientMutationId?: string; @@ -1396,15 +1395,6 @@ export interface UserToManyCryptoAddressFilter { /** Filters to entities where no related entity matches. */ none?: CryptoAddressFilter; } -/** A filter to be used against many `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface UserToManyConnectedAccountFilter { - /** Filters to entities where at least one related entity matches. */ - some?: ConnectedAccountFilter; - /** Filters to entities where every related entity matches. */ - every?: ConnectedAccountFilter; - /** Filters to entities where no related entity matches. */ - none?: ConnectedAccountFilter; -} /** A filter to be used against many `AuditLog` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyAuditLogFilter { /** Filters to entities where at least one related entity matches. */ @@ -1517,33 +1507,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -/** A filter to be used against `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} /** A filter to be used against `AuditLog` object types. All fields are combined with a logical ‘and.’ */ export interface AuditLogFilter { /** Filter by the object’s `id` field. */ @@ -1686,10 +1649,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `auditLogsByActorId` relation. */ auditLogsByActorId?: UserToManyAuditLogFilter; /** `auditLogsByActorId` exist. */ @@ -1783,41 +1742,6 @@ export interface StringFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: string; } -/** A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ */ -export interface JSONFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: Record; - /** Not equal to the specified value. */ - notEqualTo?: Record; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: Record; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: Record; - /** Included in the specified list. */ - in?: Record[]; - /** Not included in the specified list. */ - notIn?: Record[]; - /** Less than the specified value. */ - lessThan?: Record; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: Record; - /** Greater than the specified value. */ - greaterThan?: Record; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: Record; - /** Contains the specified JSON. */ - contains?: Record; - /** Contains the specified key. */ - containsKey?: string; - /** Contains all of the specified keys. */ - containsAllKeys?: string[]; - /** Contains any of the specified keys. */ - containsAnyKeys?: string[]; - /** Contained by the specified JSON. */ - containedBy?: Record; -} /** A filter to be used against InternetAddress fields. All fields are combined with a logical ‘and.’ */ export interface InternetAddressFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -1931,6 +1855,30 @@ export interface CheckPasswordPayload { export type CheckPasswordPayloadSelect = { clientMutationId?: boolean; }; +export interface DisconnectAccountPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DisconnectAccountPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeSessionPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeSessionPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface VerifyPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -1971,6 +1919,14 @@ export type VerifyEmailPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface ProvisionNewUserPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type ProvisionNewUserPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ResetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -1979,24 +1935,24 @@ export type ResetPasswordPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface SignInOneTimeTokenPayload { +export interface CreateApiKeyPayload { clientMutationId?: string | null; - result?: SignInOneTimeTokenRecord | null; + result?: CreateApiKeyRecord | null; } -export type SignInOneTimeTokenPayloadSelect = { +export type CreateApiKeyPayloadSelect = { clientMutationId?: boolean; result?: { - select: SignInOneTimeTokenRecordSelect; + select: CreateApiKeyRecordSelect; }; }; -export interface SignInPayload { +export interface SignInCrossOriginPayload { clientMutationId?: string | null; - result?: SignInRecord | null; + result?: SignInCrossOriginRecord | null; } -export type SignInPayloadSelect = { +export type SignInCrossOriginPayloadSelect = { clientMutationId?: boolean; result?: { - select: SignInRecordSelect; + select: SignInCrossOriginRecordSelect; }; }; export interface SignUpPayload { @@ -2009,14 +1965,24 @@ export type SignUpPayloadSelect = { select: SignUpRecordSelect; }; }; -export interface OneTimeTokenPayload { +export interface RequestCrossOriginTokenPayload { clientMutationId?: string | null; result?: string | null; } -export type OneTimeTokenPayloadSelect = { +export type RequestCrossOriginTokenPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SignInPayload { + clientMutationId?: string | null; + result?: SignInRecord | null; +} +export type SignInPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: SignInRecordSelect; + }; +}; export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -2230,51 +2196,6 @@ export type DeleteCryptoAddressPayloadSelect = { select: CryptoAddressEdgeSelect; }; }; -export interface CreateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was created by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type CreateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface UpdateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was updated by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type UpdateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface DeleteConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was deleted by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type DeleteConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; export interface CreateAuditLogPayload { clientMutationId?: string | null; /** The `AuditLog` that was created by this mutation. */ @@ -2365,6 +2286,17 @@ export type DeleteRoleTypePayloadSelect = { select: RoleTypeEdgeSelect; }; }; +export interface CreateUserConnectedAccountPayload { + clientMutationId?: string | null; + /** The `UserConnectedAccount` that was created by this mutation. */ + userConnectedAccount?: UserConnectedAccount | null; +} +export type CreateUserConnectedAccountPayloadSelect = { + clientMutationId?: boolean; + userConnectedAccount?: { + select: UserConnectedAccountSelect; + }; +}; export interface CreateUserPayload { clientMutationId?: string | null; /** The `User` that was created by this mutation. */ @@ -2410,7 +2342,15 @@ export type DeleteUserPayloadSelect = { select: UserEdgeSelect; }; }; -export interface SignInOneTimeTokenRecord { +export interface CreateApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; +} +export type CreateApiKeyRecordSelect = { + apiKey?: boolean; + keyId?: boolean; +}; +export interface SignInCrossOriginRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -2418,7 +2358,7 @@ export interface SignInOneTimeTokenRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInOneTimeTokenRecordSelect = { +export type SignInCrossOriginRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -2426,7 +2366,7 @@ export type SignInOneTimeTokenRecordSelect = { isVerified?: boolean; totpEnabled?: boolean; }; -export interface SignInRecord { +export interface SignUpRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -2434,7 +2374,7 @@ export interface SignInRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInRecordSelect = { +export type SignUpRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -2442,21 +2382,25 @@ export type SignInRecordSelect = { isVerified?: boolean; totpEnabled?: boolean; }; -export interface SignUpRecord { +export interface SignInRecord { id?: string | null; userId?: string | null; accessToken?: string | null; accessTokenExpiresAt?: string | null; isVerified?: boolean | null; totpEnabled?: boolean | null; + mfaRequired?: boolean | null; + mfaChallengeToken?: string | null; } -export type SignUpRecordSelect = { +export type SignInRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; accessTokenExpiresAt?: boolean; isVerified?: boolean; totpEnabled?: boolean; + mfaRequired?: boolean; + mfaChallengeToken?: boolean; }; export interface ExtendTokenExpiresRecord { id?: string | null; @@ -2504,18 +2448,6 @@ export type CryptoAddressEdgeSelect = { select: CryptoAddressSelect; }; }; -/** A `ConnectedAccount` edge in the connection. */ -export interface ConnectedAccountEdge { - cursor?: string | null; - /** The `ConnectedAccount` at the end of the edge. */ - node?: ConnectedAccount | null; -} -export type ConnectedAccountEdgeSelect = { - cursor?: boolean; - node?: { - select: ConnectedAccountSelect; - }; -}; /** A `AuditLog` edge in the connection. */ export interface AuditLogEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/auth/orm/models/index.ts b/sdk/constructive-react/src/auth/orm/models/index.ts index c21f0cd77..4e1b0adfe 100644 --- a/sdk/constructive-react/src/auth/orm/models/index.ts +++ b/sdk/constructive-react/src/auth/orm/models/index.ts @@ -6,7 +6,7 @@ export { EmailModel } from './email'; export { PhoneNumberModel } from './phoneNumber'; export { CryptoAddressModel } from './cryptoAddress'; -export { ConnectedAccountModel } from './connectedAccount'; export { AuditLogModel } from './auditLog'; export { RoleTypeModel } from './roleType'; +export { UserConnectedAccountModel } from './userConnectedAccount'; export { UserModel } from './user'; diff --git a/sdk/constructive-react/src/auth/orm/models/userConnectedAccount.ts b/sdk/constructive-react/src/auth/orm/models/userConnectedAccount.ts new file mode 100644 index 000000000..45bbea7f4 --- /dev/null +++ b/sdk/constructive-react/src/auth/orm/models/userConnectedAccount.ts @@ -0,0 +1,169 @@ +/** + * UserConnectedAccount model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + UserConnectedAccount, + UserConnectedAccountWithRelations, + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, + CreateUserConnectedAccountInput, + UpdateUserConnectedAccountInput, + UserConnectedAccountPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserConnectedAccountModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + }, + 'UserConnectedAccountFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccount: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccount', + document, + variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserConnectedAccount: { + userConnectedAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserConnectedAccount', + 'createUserConnectedAccount', + 'userConnectedAccount', + args.select, + args.data, + 'CreateUserConnectedAccountInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserConnectedAccount', + fieldName: 'createUserConnectedAccount', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/auth/orm/mutation/index.ts b/sdk/constructive-react/src/auth/orm/mutation/index.ts index d3e0d4862..c8f543ad7 100644 --- a/sdk/constructive-react/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-react/src/auth/orm/mutation/index.ts @@ -10,16 +10,21 @@ import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, + DisconnectAccountInput, + RevokeApiKeyInput, + RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, + ProvisionNewUserInput, ResetPasswordInput, - SignInOneTimeTokenInput, - SignInInput, + CreateApiKeyInput, + SignInCrossOriginInput, SignUpInput, - OneTimeTokenInput, + RequestCrossOriginTokenInput, + SignInInput, ExtendTokenExpiresInput, ForgotPasswordInput, SendVerificationEmailInput, @@ -29,16 +34,21 @@ import type { SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, + DisconnectAccountPayload, + RevokeApiKeyPayload, + RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, + ProvisionNewUserPayload, ResetPasswordPayload, - SignInOneTimeTokenPayload, - SignInPayload, + CreateApiKeyPayload, + SignInCrossOriginPayload, SignUpPayload, - OneTimeTokenPayload, + RequestCrossOriginTokenPayload, + SignInPayload, ExtendTokenExpiresPayload, ForgotPasswordPayload, SendVerificationEmailPayload, @@ -48,16 +58,21 @@ import type { SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, + DisconnectAccountPayloadSelect, + RevokeApiKeyPayloadSelect, + RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, + ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, - SignInOneTimeTokenPayloadSelect, - SignInPayloadSelect, + CreateApiKeyPayloadSelect, + SignInCrossOriginPayloadSelect, SignUpPayloadSelect, - OneTimeTokenPayloadSelect, + RequestCrossOriginTokenPayloadSelect, + SignInPayloadSelect, ExtendTokenExpiresPayloadSelect, ForgotPasswordPayloadSelect, SendVerificationEmailPayloadSelect, @@ -75,6 +90,15 @@ export interface SendAccountDeletionEmailVariables { export interface CheckPasswordVariables { input: CheckPasswordInput; } +export interface DisconnectAccountVariables { + input: DisconnectAccountInput; +} +export interface RevokeApiKeyVariables { + input: RevokeApiKeyInput; +} +export interface RevokeSessionVariables { + input: RevokeSessionInput; +} export interface VerifyPasswordVariables { input: VerifyPasswordInput; } @@ -90,20 +114,26 @@ export interface SetPasswordVariables { export interface VerifyEmailVariables { input: VerifyEmailInput; } +export interface ProvisionNewUserVariables { + input: ProvisionNewUserInput; +} export interface ResetPasswordVariables { input: ResetPasswordInput; } -export interface SignInOneTimeTokenVariables { - input: SignInOneTimeTokenInput; +export interface CreateApiKeyVariables { + input: CreateApiKeyInput; } -export interface SignInVariables { - input: SignInInput; +export interface SignInCrossOriginVariables { + input: SignInCrossOriginInput; } export interface SignUpVariables { input: SignUpInput; } -export interface OneTimeTokenVariables { - input: OneTimeTokenInput; +export interface RequestCrossOriginTokenVariables { + input: RequestCrossOriginTokenInput; +} +export interface SignInVariables { + input: SignInInput; } export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; @@ -232,6 +262,93 @@ export function createMutationOperations(client: OrmClient) { 'CheckPasswordPayload' ), }), + disconnectAccount: ( + args: DisconnectAccountVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + disconnectAccount: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'DisconnectAccount', + fieldName: 'disconnectAccount', + ...buildCustomDocument( + 'mutation', + 'DisconnectAccount', + 'disconnectAccount', + options.select, + args, + [ + { + name: 'input', + type: 'DisconnectAccountInput!', + }, + ], + connectionFieldsMap, + 'DisconnectAccountPayload' + ), + }), + revokeApiKey: ( + args: RevokeApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeApiKey', + fieldName: 'revokeApiKey', + ...buildCustomDocument( + 'mutation', + 'RevokeApiKey', + 'revokeApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeApiKeyInput!', + }, + ], + connectionFieldsMap, + 'RevokeApiKeyPayload' + ), + }), + revokeSession: ( + args: RevokeSessionVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeSession: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeSession', + fieldName: 'revokeSession', + ...buildCustomDocument( + 'mutation', + 'RevokeSession', + 'revokeSession', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeSessionInput!', + }, + ], + connectionFieldsMap, + 'RevokeSessionPayload' + ), + }), verifyPassword: ( args: VerifyPasswordVariables, options: { @@ -377,6 +494,35 @@ export function createMutationOperations(client: OrmClient) { 'VerifyEmailPayload' ), }), + provisionNewUser: ( + args: ProvisionNewUserVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + provisionNewUser: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ProvisionNewUser', + fieldName: 'provisionNewUser', + ...buildCustomDocument( + 'mutation', + 'ProvisionNewUser', + 'provisionNewUser', + options.select, + args, + [ + { + name: 'input', + type: 'ProvisionNewUserInput!', + }, + ], + connectionFieldsMap, + 'ProvisionNewUserPayload' + ), + }), resetPassword: ( args: ResetPasswordVariables, options: { @@ -406,62 +552,62 @@ export function createMutationOperations(client: OrmClient) { 'ResetPasswordPayload' ), }), - signInOneTimeToken: ( - args: SignInOneTimeTokenVariables, + createApiKey: ( + args: CreateApiKeyVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signInOneTimeToken: InferSelectResult | null; + createApiKey: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignInOneTimeToken', - fieldName: 'signInOneTimeToken', + operationName: 'CreateApiKey', + fieldName: 'createApiKey', ...buildCustomDocument( 'mutation', - 'SignInOneTimeToken', - 'signInOneTimeToken', + 'CreateApiKey', + 'createApiKey', options.select, args, [ { name: 'input', - type: 'SignInOneTimeTokenInput!', + type: 'CreateApiKeyInput!', }, ], connectionFieldsMap, - 'SignInOneTimeTokenPayload' + 'CreateApiKeyPayload' ), }), - signIn: ( - args: SignInVariables, + signInCrossOrigin: ( + args: SignInCrossOriginVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signIn: InferSelectResult | null; + signInCrossOrigin: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignIn', - fieldName: 'signIn', + operationName: 'SignInCrossOrigin', + fieldName: 'signInCrossOrigin', ...buildCustomDocument( 'mutation', - 'SignIn', - 'signIn', + 'SignInCrossOrigin', + 'signInCrossOrigin', options.select, args, [ { name: 'input', - type: 'SignInInput!', + type: 'SignInCrossOriginInput!', }, ], connectionFieldsMap, - 'SignInPayload' + 'SignInCrossOriginPayload' ), }), signUp: ( @@ -493,33 +639,62 @@ export function createMutationOperations(client: OrmClient) { 'SignUpPayload' ), }), - oneTimeToken: ( - args: OneTimeTokenVariables, + requestCrossOriginToken: ( + args: RequestCrossOriginTokenVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + requestCrossOriginToken: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RequestCrossOriginToken', + fieldName: 'requestCrossOriginToken', + ...buildCustomDocument( + 'mutation', + 'RequestCrossOriginToken', + 'requestCrossOriginToken', + options.select, + args, + [ + { + name: 'input', + type: 'RequestCrossOriginTokenInput!', + }, + ], + connectionFieldsMap, + 'RequestCrossOriginTokenPayload' + ), + }), + signIn: ( + args: SignInVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - oneTimeToken: InferSelectResult | null; + signIn: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'OneTimeToken', - fieldName: 'oneTimeToken', + operationName: 'SignIn', + fieldName: 'signIn', ...buildCustomDocument( 'mutation', - 'OneTimeToken', - 'oneTimeToken', + 'SignIn', + 'signIn', options.select, args, [ { name: 'input', - type: 'OneTimeTokenInput!', + type: 'SignInInput!', }, ], connectionFieldsMap, - 'OneTimeTokenPayload' + 'SignInPayload' ), }), extendTokenExpires: ( diff --git a/sdk/constructive-react/src/auth/orm/query/index.ts b/sdk/constructive-react/src/auth/orm/query/index.ts index 69150c6c7..408632294 100644 --- a/sdk/constructive-react/src/auth/orm/query/index.ts +++ b/sdk/constructive-react/src/auth/orm/query/index.ts @@ -8,20 +8,23 @@ import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; import type { User, UserSelect } from '../input-types'; import { connectionFieldsMap } from '../input-types'; +export interface RequireStepUpVariables { + stepUpType?: string; +} export function createQueryOperations(client: OrmClient) { return { - currentIpAddress: (options?: { select?: Record }) => + currentUserAgent: (options?: { select?: Record }) => new QueryBuilder<{ - currentIpAddress: string | null; + currentUserAgent: string | null; }>({ client, operation: 'query', - operationName: 'CurrentIpAddress', - fieldName: 'currentIpAddress', + operationName: 'CurrentUserAgent', + fieldName: 'currentUserAgent', ...buildCustomDocument( 'query', - 'CurrentIpAddress', - 'currentIpAddress', + 'CurrentUserAgent', + 'currentUserAgent', options?.select, undefined, [], @@ -29,18 +32,18 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentUserAgent: (options?: { select?: Record }) => + currentIpAddress: (options?: { select?: Record }) => new QueryBuilder<{ - currentUserAgent: string | null; + currentIpAddress: string | null; }>({ client, operation: 'query', - operationName: 'CurrentUserAgent', - fieldName: 'currentUserAgent', + operationName: 'CurrentIpAddress', + fieldName: 'currentIpAddress', ...buildCustomDocument( 'query', - 'CurrentUserAgent', - 'currentUserAgent', + 'CurrentIpAddress', + 'currentIpAddress', options?.select, undefined, [], @@ -67,6 +70,35 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + requireStepUp: ( + args: RequireStepUpVariables, + options?: { + select?: Record; + } + ) => + new QueryBuilder<{ + requireStepUp: boolean | null; + }>({ + client, + operation: 'query', + operationName: 'RequireStepUp', + fieldName: 'requireStepUp', + ...buildCustomDocument( + 'query', + 'RequireStepUp', + 'requireStepUp', + options?.select, + args, + [ + { + name: 'stepUpType', + type: 'String', + }, + ], + connectionFieldsMap, + undefined + ), + }), currentUser: ( options: { select: S; diff --git a/sdk/constructive-react/src/auth/schema-types.ts b/sdk/constructive-react/src/auth/schema-types.ts index 57b0b22dd..9aab53391 100644 --- a/sdk/constructive-react/src/auth/schema-types.ts +++ b/sdk/constructive-react/src/auth/schema-types.ts @@ -6,12 +6,12 @@ import type { AuditLog, - ConnectedAccount, CryptoAddress, Email, PhoneNumber, RoleType, User, + UserConnectedAccount, BigFloatFilter, BigIntFilter, BitStringFilter, @@ -92,27 +92,6 @@ export type CryptoAddressOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `ConnectedAccount`. */ -export type ConnectedAccountOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SERVICE_ASC' - | 'SERVICE_DESC' - | 'IDENTIFIER_ASC' - | 'IDENTIFIER_DESC' - | 'DETAILS_ASC' - | 'DETAILS_DESC' - | 'IS_VERIFIED_ASC' - | 'IS_VERIFIED_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; /** Methods to use when ordering `AuditLog`. */ export type AuditLogOrderBy = | 'NATURAL' @@ -143,6 +122,25 @@ export type RoleTypeOrderBy = | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC'; +/** Methods to use when ordering `UserConnectedAccount`. */ +export type UserConnectedAccountOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SERVICE_ASC' + | 'SERVICE_DESC' + | 'IDENTIFIER_ASC' + | 'IDENTIFIER_DESC' + | 'DETAILS_ASC' + | 'DETAILS_DESC' + | 'IS_VERIFIED_ASC' + | 'IS_VERIFIED_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `User`. */ export type UserOrderBy = | 'NATURAL' @@ -310,10 +308,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `auditLogsByActorId` relation. */ auditLogsByActorId?: UserToManyAuditLogFilter; /** `auditLogsByActorId` exist. */ @@ -545,42 +539,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -/** A filter to be used against many `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface UserToManyConnectedAccountFilter { - /** Filters to entities where at least one related entity matches. */ - some?: ConnectedAccountFilter; - /** Filters to entities where every related entity matches. */ - every?: ConnectedAccountFilter; - /** Filters to entities where no related entity matches. */ - none?: ConnectedAccountFilter; -} -/** A filter to be used against `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} /** A filter to be used against many `AuditLog` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyAuditLogFilter { /** Filters to entities where at least one related entity matches. */ @@ -696,6 +654,31 @@ export interface ConstructiveInternalTypeOriginFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: string; } +/** A filter to be used against `UserConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ +export interface UserConnectedAccountFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `service` field. */ + service?: StringFilter; + /** Filter by the object’s `identifier` field. */ + identifier?: StringFilter; + /** Filter by the object’s `details` field. */ + details?: JSONFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: UserConnectedAccountFilter[]; + /** Checks for any expressions in this list. */ + or?: UserConnectedAccountFilter[]; + /** Negates the expression. */ + not?: UserConnectedAccountFilter; +} export interface SignOutInput { clientMutationId?: string; } @@ -706,6 +689,18 @@ export interface CheckPasswordInput { clientMutationId?: string; password?: string; } +export interface DisconnectAccountInput { + clientMutationId?: string; + accountId: string; +} +export interface RevokeApiKeyInput { + clientMutationId?: string; + keyId: string; +} +export interface RevokeSessionInput { + clientMutationId?: string; + sessionId: string; +} export interface VerifyPasswordInput { clientMutationId?: string; password: string; @@ -729,18 +724,29 @@ export interface VerifyEmailInput { emailId?: string; token?: string; } +export interface ProvisionNewUserInput { + clientMutationId?: string; + email?: string; + password?: string; +} export interface ResetPasswordInput { clientMutationId?: string; roleId?: string; resetToken?: string; newPassword?: string; } -export interface SignInOneTimeTokenInput { +export interface CreateApiKeyInput { + clientMutationId?: string; + keyName: string; + accessLevel?: string; + mfaLevel?: string; +} +export interface SignInCrossOriginInput { clientMutationId?: string; token?: string; credentialKind?: string; } -export interface SignInInput { +export interface SignUpInput { clientMutationId?: string; email?: string; password?: string; @@ -748,20 +754,21 @@ export interface SignInInput { credentialKind?: string; csrfToken?: string; } -export interface SignUpInput { +export interface RequestCrossOriginTokenInput { clientMutationId?: string; email?: string; password?: string; + origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; - credentialKind?: string; - csrfToken?: string; } -export interface OneTimeTokenInput { +export interface SignInInput { clientMutationId?: string; email?: string; password?: string; - origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; + credentialKind?: string; + csrfToken?: string; + deviceToken?: string; } export interface ExtendTokenExpiresInput { clientMutationId?: string; @@ -842,22 +849,18 @@ export interface PhoneNumberInput { createdAt?: string; updatedAt?: string; } -export interface CreateConnectedAccountInput { +export interface CreateUserConnectedAccountInput { clientMutationId?: string; - /** The `ConnectedAccount` to be created by this mutation. */ - connectedAccount: ConnectedAccountInput; + /** The `UserConnectedAccount` to be created by this mutation. */ + userConnectedAccount: UserConnectedAccountInput; } -/** An input for mutations affecting `ConnectedAccount` */ -export interface ConnectedAccountInput { +/** An input for mutations affecting `UserConnectedAccount` */ +export interface UserConnectedAccountInput { id?: string; ownerId?: string; - /** The service used, e.g. `twitter` or `github`. */ - service: string; - /** A unique identifier for the user within the service */ - identifier: string; - /** Additional profile details extracted from this login method */ - details: unknown; - /** Whether this connected account has been verified */ + service?: string; + identifier?: string; + details?: unknown; isVerified?: boolean; createdAt?: string; updatedAt?: string; @@ -969,27 +972,6 @@ export interface PhoneNumberPatch { createdAt?: string; updatedAt?: string; } -export interface UpdateConnectedAccountInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `ConnectedAccount` being updated. */ - connectedAccountPatch: ConnectedAccountPatch; -} -/** Represents an update to a `ConnectedAccount`. Fields that are set will be updated. */ -export interface ConnectedAccountPatch { - id?: string; - ownerId?: string; - /** The service used, e.g. `twitter` or `github`. */ - service?: string; - /** A unique identifier for the user within the service */ - identifier?: string; - /** Additional profile details extracted from this login method */ - details?: unknown; - /** Whether this connected account has been verified */ - isVerified?: boolean; - createdAt?: string; - updatedAt?: string; -} export interface UpdateAuditLogInput { clientMutationId?: string; id: string; @@ -1063,10 +1045,6 @@ export interface DeletePhoneNumberInput { clientMutationId?: string; id: string; } -export interface DeleteConnectedAccountInput { - clientMutationId?: string; - id: string; -} export interface DeleteAuditLogInput { clientMutationId?: string; id: string; @@ -1120,10 +1098,10 @@ export interface PhoneNumberConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `ConnectedAccount` values. */ -export interface ConnectedAccountConnection { - nodes: ConnectedAccount[]; - edges: ConnectedAccountEdge[]; +/** A connection to a list of `UserConnectedAccount` values. */ +export interface UserConnectedAccountConnection { + nodes: UserConnectedAccount[]; + edges: UserConnectedAccountEdge[]; pageInfo: PageInfo; totalCount: number; } @@ -1162,6 +1140,18 @@ export interface SendAccountDeletionEmailPayload { export interface CheckPasswordPayload { clientMutationId?: string | null; } +export interface DisconnectAccountPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export interface RevokeApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export interface RevokeSessionPayload { + clientMutationId?: string | null; + result?: boolean | null; +} export interface VerifyPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -1182,26 +1172,34 @@ export interface VerifyEmailPayload { clientMutationId?: string | null; result?: boolean | null; } +export interface ProvisionNewUserPayload { + clientMutationId?: string | null; + result?: string | null; +} export interface ResetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; } -export interface SignInOneTimeTokenPayload { +export interface CreateApiKeyPayload { clientMutationId?: string | null; - result?: SignInOneTimeTokenRecord | null; + result?: CreateApiKeyRecord | null; } -export interface SignInPayload { +export interface SignInCrossOriginPayload { clientMutationId?: string | null; - result?: SignInRecord | null; + result?: SignInCrossOriginRecord | null; } export interface SignUpPayload { clientMutationId?: string | null; result?: SignUpRecord | null; } -export interface OneTimeTokenPayload { +export interface RequestCrossOriginTokenPayload { clientMutationId?: string | null; result?: string | null; } +export interface SignInPayload { + clientMutationId?: string | null; + result?: SignInRecord | null; +} export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -1231,11 +1229,10 @@ export interface CreatePhoneNumberPayload { phoneNumber?: PhoneNumber | null; phoneNumberEdge?: PhoneNumberEdge | null; } -export interface CreateConnectedAccountPayload { +export interface CreateUserConnectedAccountPayload { clientMutationId?: string | null; - /** The `ConnectedAccount` that was created by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; + /** The `UserConnectedAccount` that was created by this mutation. */ + userConnectedAccount?: UserConnectedAccount | null; } export interface CreateAuditLogPayload { clientMutationId?: string | null; @@ -1273,12 +1270,6 @@ export interface UpdatePhoneNumberPayload { phoneNumber?: PhoneNumber | null; phoneNumberEdge?: PhoneNumberEdge | null; } -export interface UpdateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was updated by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} export interface UpdateAuditLogPayload { clientMutationId?: string | null; /** The `AuditLog` that was updated by this mutation. */ @@ -1315,12 +1306,6 @@ export interface DeletePhoneNumberPayload { phoneNumber?: PhoneNumber | null; phoneNumberEdge?: PhoneNumberEdge | null; } -export interface DeleteConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was deleted by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} export interface DeleteAuditLogPayload { clientMutationId?: string | null; /** The `AuditLog` that was deleted by this mutation. */ @@ -1402,11 +1387,11 @@ export interface PhoneNumberEdge { /** The `PhoneNumber` at the end of the edge. */ node?: PhoneNumber | null; } -/** A `ConnectedAccount` edge in the connection. */ -export interface ConnectedAccountEdge { +/** A `UserConnectedAccount` edge in the connection. */ +export interface UserConnectedAccountEdge { cursor?: string | null; - /** The `ConnectedAccount` at the end of the edge. */ - node?: ConnectedAccount | null; + /** The `UserConnectedAccount` at the end of the edge. */ + node?: UserConnectedAccount | null; } /** A `AuditLog` edge in the connection. */ export interface AuditLogEdge { @@ -1440,7 +1425,11 @@ export interface MetaTable { inflection: MetaInflection; query: MetaQuery; } -export interface SignInOneTimeTokenRecord { +export interface CreateApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; +} +export interface SignInCrossOriginRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -1448,7 +1437,7 @@ export interface SignInOneTimeTokenRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export interface SignInRecord { +export interface SignUpRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -1456,13 +1445,15 @@ export interface SignInRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export interface SignUpRecord { +export interface SignInRecord { id?: string | null; userId?: string | null; accessToken?: string | null; accessTokenExpiresAt?: string | null; isVerified?: boolean | null; totpEnabled?: boolean | null; + mfaRequired?: boolean | null; + mfaChallengeToken?: string | null; } export interface ExtendTokenExpiresRecord { id?: string | null; diff --git a/sdk/constructive-react/src/auth/types.ts b/sdk/constructive-react/src/auth/types.ts index b73b7c9a3..88b4da3cf 100644 --- a/sdk/constructive-react/src/auth/types.ts +++ b/sdk/constructive-react/src/auth/types.ts @@ -34,16 +34,6 @@ export interface CryptoAddress { createdAt: string | null; updatedAt: string | null; } -export interface ConnectedAccount { - id: string | null; - ownerId: string | null; - service: string | null; - identifier: string | null; - details: unknown | null; - isVerified: boolean | null; - createdAt: string | null; - updatedAt: string | null; -} export interface AuditLog { id: string | null; event: string | null; @@ -58,6 +48,16 @@ export interface RoleType { id: number | null; name: string | null; } +export interface UserConnectedAccount { + id: string | null; + ownerId: string | null; + service: string | null; + identifier: string | null; + details: unknown | null; + isVerified: boolean | null; + createdAt: string | null; + updatedAt: string | null; +} export interface User { id: string | null; username: string | null; diff --git a/sdk/constructive-react/src/public/README.md b/sdk/constructive-react/src/public/README.md index a8654f857..7973adf67 100644 --- a/sdk/constructive-react/src/public/README.md +++ b/sdk/constructive-react/src/public/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 109 -- **Custom queries:** 20 -- **Custom mutations:** 44 +- **Tables:** 114 +- **Custom queries:** 22 +- **Custom mutations:** 50 **Generators:** ORM, React Query diff --git a/sdk/constructive-react/src/public/hooks/README.md b/sdk/constructive-react/src/public/hooks/README.md index 4d479e832..2b434d279 100644 --- a/sdk/constructive-react/src/public/hooks/README.md +++ b/sdk/constructive-react/src/public/hooks/README.md @@ -83,6 +83,11 @@ function App() { | `useCreateFieldMutation` | Mutation | Create a field | | `useUpdateFieldMutation` | Mutation | Update a field | | `useDeleteFieldMutation` | Mutation | Delete a field | +| `useSpatialRelationsQuery` | Query | List all spatialRelations | +| `useSpatialRelationQuery` | Query | Get one spatialRelation | +| `useCreateSpatialRelationMutation` | Mutation | Create a spatialRelation | +| `useUpdateSpatialRelationMutation` | Mutation | Update a spatialRelation | +| `useDeleteSpatialRelationMutation` | Mutation | Delete a spatialRelation | | `useForeignKeyConstraintsQuery` | Query | List all foreignKeyConstraints | | `useForeignKeyConstraintQuery` | Query | Get one foreignKeyConstraint | | `useCreateForeignKeyConstraintMutation` | Mutation | Create a foreignKeyConstraint | @@ -148,11 +153,6 @@ function App() { | `useCreateEmbeddingChunkMutation` | Mutation | Create a embeddingChunk | | `useUpdateEmbeddingChunkMutation` | Mutation | Update a embeddingChunk | | `useDeleteEmbeddingChunkMutation` | Mutation | Delete a embeddingChunk | -| `useTableTemplateModulesQuery` | Query | List all tableTemplateModules | -| `useTableTemplateModuleQuery` | Query | Get one tableTemplateModule | -| `useCreateTableTemplateModuleMutation` | Mutation | Create a tableTemplateModule | -| `useUpdateTableTemplateModuleMutation` | Mutation | Update a tableTemplateModule | -| `useDeleteTableTemplateModuleMutation` | Mutation | Delete a tableTemplateModule | | `useSecureTableProvisionsQuery` | Query | Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. | | `useSecureTableProvisionQuery` | Query | Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. | | `useCreateSecureTableProvisionMutation` | Mutation | Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. | @@ -198,6 +198,11 @@ function App() { This is a one-and-done structural provisioner. To layer additional security onto junction tables after creation, use secure_table_provision directly. All operations are graceful: existing fields, FK constraints, and unique constraints are reused if found. The trigger never injects values the caller did not provide. All security config is forwarded to secure_table_provision as-is. | +| `useSessionSecretsModulesQuery` | Query | Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. | +| `useSessionSecretsModuleQuery` | Query | Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. | +| `useCreateSessionSecretsModuleMutation` | Mutation | Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. | +| `useUpdateSessionSecretsModuleMutation` | Mutation | Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. | +| `useDeleteSessionSecretsModuleMutation` | Mutation | Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. | | `useSchemaGrantsQuery` | Query | List all schemaGrants | | `useSchemaGrantQuery` | Query | Get one schemaGrant | | `useCreateSchemaGrantMutation` | Mutation | Create a schemaGrant | @@ -383,6 +388,51 @@ function App() { | `useCreateStorageModuleMutation` | Mutation | Create a storageModule | | `useUpdateStorageModuleMutation` | Mutation | Update a storageModule | | `useDeleteStorageModuleMutation` | Mutation | Delete a storageModule | +| `useEntityTypeProvisionsQuery` | Query | 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. | +| `useEntityTypeProvisionQuery` | Query | 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. | +| `useCreateEntityTypeProvisionMutation` | Mutation | 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. | +| `useUpdateEntityTypeProvisionMutation` | Mutation | 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. | +| `useDeleteEntityTypeProvisionMutation` | Mutation | 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. | +| `useWebauthnCredentialsModulesQuery` | Query | Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. | +| `useWebauthnCredentialsModuleQuery` | Query | Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. | +| `useCreateWebauthnCredentialsModuleMutation` | Mutation | Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. | +| `useUpdateWebauthnCredentialsModuleMutation` | Mutation | Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. | +| `useDeleteWebauthnCredentialsModuleMutation` | Mutation | Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. | | `useDatabaseProvisionModulesQuery` | Query | Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. | | `useDatabaseProvisionModuleQuery` | Query | Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. | | `useCreateDatabaseProvisionModuleMutation` | Mutation | Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. | @@ -423,6 +473,11 @@ function App() { | `useCreateOrgOwnerGrantMutation` | Mutation | Records of ownership transfers and grants between members | | `useUpdateOrgOwnerGrantMutation` | Mutation | Records of ownership transfers and grants between members | | `useDeleteOrgOwnerGrantMutation` | Mutation | Records of ownership transfers and grants between members | +| `useOrgMemberProfilesQuery` | Query | Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) | +| `useOrgMemberProfileQuery` | Query | Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) | +| `useCreateOrgMemberProfileMutation` | Mutation | Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) | +| `useUpdateOrgMemberProfileMutation` | Mutation | Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) | +| `useDeleteOrgMemberProfileMutation` | Mutation | Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) | | `useOrgGrantsQuery` | Query | Records of individual permission grants and revocations for members via bitmask | | `useOrgGrantQuery` | Query | Records of individual permission grants and revocations for members via bitmask | | `useCreateOrgGrantMutation` | Mutation | Records of individual permission grants and revocations for members via bitmask | @@ -483,11 +538,6 @@ function App() { | `useCreateCryptoAddressMutation` | Mutation | Cryptocurrency wallet addresses owned by users, with network-specific validation and verification | | `useUpdateCryptoAddressMutation` | Mutation | Cryptocurrency wallet addresses owned by users, with network-specific validation and verification | | `useDeleteCryptoAddressMutation` | Mutation | Cryptocurrency wallet addresses owned by users, with network-specific validation and verification | -| `useConnectedAccountsQuery` | Query | OAuth and social login connections linking external service accounts to users | -| `useConnectedAccountQuery` | Query | OAuth and social login connections linking external service accounts to users | -| `useCreateConnectedAccountMutation` | Mutation | OAuth and social login connections linking external service accounts to users | -| `useUpdateConnectedAccountMutation` | Mutation | OAuth and social login connections linking external service accounts to users | -| `useDeleteConnectedAccountMutation` | Mutation | OAuth and social login connections linking external service accounts to users | | `useAppInvitesQuery` | Query | Invitation records sent to prospective members via email, with token-based redemption and expiration | | `useAppInviteQuery` | Query | Invitation records sent to prospective members via email, with token-based redemption and expiration | | `useCreateAppInviteMutation` | Mutation | Invitation records sent to prospective members via email, with token-based redemption and expiration | @@ -548,11 +598,16 @@ function App() { | `useCreateOrgLimitDefaultMutation` | Mutation | Default maximum values for each named limit, applied when no per-actor override exists | | `useUpdateOrgLimitDefaultMutation` | Mutation | Default maximum values for each named limit, applied when no per-actor override exists | | `useDeleteOrgLimitDefaultMutation` | Mutation | Default maximum values for each named limit, applied when no per-actor override exists | -| `useMembershipTypesQuery` | Query | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | -| `useMembershipTypeQuery` | Query | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | -| `useCreateMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | -| `useUpdateMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | -| `useDeleteMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | +| `useDevicesModulesQuery` | Query | List all devicesModules | +| `useDevicesModuleQuery` | Query | Get one devicesModule | +| `useCreateDevicesModuleMutation` | Mutation | Create a devicesModule | +| `useUpdateDevicesModuleMutation` | Mutation | Update a devicesModule | +| `useDeleteDevicesModuleMutation` | Mutation | Delete a devicesModule | +| `useUserConnectedAccountsQuery` | Query | List all userConnectedAccounts | +| `useUserConnectedAccountQuery` | Query | Get one userConnectedAccount | +| `useCreateUserConnectedAccountMutation` | Mutation | Create a userConnectedAccount | +| `useUpdateUserConnectedAccountMutation` | Mutation | Update a userConnectedAccount | +| `useDeleteUserConnectedAccountMutation` | Mutation | Delete a userConnectedAccount | | `useAppMembershipDefaultsQuery` | Query | Default membership settings per entity, controlling initial approval and verification state for new members | | `useAppMembershipDefaultQuery` | Query | Default membership settings per entity, controlling initial approval and verification state for new members | | `useCreateAppMembershipDefaultMutation` | Mutation | Default membership settings per entity, controlling initial approval and verification state for new members | @@ -568,6 +623,11 @@ function App() { | `useCreateRateLimitsModuleMutation` | Mutation | Create a rateLimitsModule | | `useUpdateRateLimitsModuleMutation` | Mutation | Update a rateLimitsModule | | `useDeleteRateLimitsModuleMutation` | Mutation | Delete a rateLimitsModule | +| `useMembershipTypesQuery` | Query | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | +| `useMembershipTypeQuery` | Query | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | +| `useCreateMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | +| `useUpdateMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | +| `useDeleteMembershipTypeMutation` | Mutation | Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) | | `useOrgMembershipDefaultsQuery` | Query | Default membership settings per entity, controlling initial approval and verification state for new members | | `useOrgMembershipDefaultQuery` | Query | Default membership settings per entity, controlling initial approval and verification state for new members | | `useCreateOrgMembershipDefaultMutation` | Mutation | Default membership settings per entity, controlling initial approval and verification state for new members | @@ -604,12 +664,14 @@ function App() { | `useUpdateHierarchyModuleMutation` | Mutation | Update a hierarchyModule | | `useDeleteHierarchyModuleMutation` | Mutation | Delete a hierarchyModule | | `useCurrentUserIdQuery` | Query | currentUserId | -| `useCurrentIpAddressQuery` | Query | currentIpAddress | | `useCurrentUserAgentQuery` | Query | currentUserAgent | +| `useCurrentIpAddressQuery` | Query | currentIpAddress | +| `useRequireStepUpQuery` | Query | requireStepUp | | `useAppPermissionsGetPaddedMaskQuery` | Query | appPermissionsGetPaddedMask | | `useOrgPermissionsGetPaddedMaskQuery` | Query | orgPermissionsGetPaddedMask | | `useStepsAchievedQuery` | Query | stepsAchieved | | `useRevParseQuery` | Query | revParse | +| `useResolveBlueprintFieldQuery` | Query | Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. | | `useOrgIsManagerOfQuery` | Query | orgIsManagerOf | | `useAppPermissionsGetMaskQuery` | Query | appPermissionsGetMask | | `useOrgPermissionsGetMaskQuery` | Query | orgPermissionsGetMask | @@ -628,6 +690,9 @@ function App() { | `useAcceptDatabaseTransferMutation` | Mutation | acceptDatabaseTransfer | | `useCancelDatabaseTransferMutation` | Mutation | cancelDatabaseTransfer | | `useRejectDatabaseTransferMutation` | Mutation | rejectDatabaseTransfer | +| `useDisconnectAccountMutation` | Mutation | disconnectAccount | +| `useRevokeApiKeyMutation` | Mutation | revokeApiKey | +| `useRevokeSessionMutation` | Mutation | revokeSession | | `useVerifyPasswordMutation` | Mutation | verifyPassword | | `useVerifyTotpMutation` | Mutation | verifyTotp | | `useSubmitAppInviteCodeMutation` | Mutation | submitAppInviteCode | @@ -638,10 +703,13 @@ function App() { | `useVerifyEmailMutation` | Mutation | verifyEmail | | `useFreezeObjectsMutation` | Mutation | freezeObjects | | `useInitEmptyRepoMutation` | Mutation | initEmptyRepo | -| `useConstructBlueprintMutation` | Mutation | Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. | +| `useConstructBlueprintMutation` | Mutation | 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. | +| `useProvisionNewUserMutation` | Mutation | provisionNewUser | | `useResetPasswordMutation` | Mutation | resetPassword | | `useRemoveNodeAtPathMutation` | Mutation | removeNodeAtPath | | `useCopyTemplateToBlueprintMutation` | Mutation | 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. | +| `useCreateApiKeyMutation` | Mutation | createApiKey | +| `useProvisionSpatialRelationMutation` | Mutation | Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. | | `useBootstrapUserMutation` | Mutation | bootstrapUser | | `useSetFieldOrderMutation` | Mutation | setFieldOrder | | `useProvisionUniqueConstraintMutation` | Mutation | Creates a unique constraint on a table. Accepts a jsonb definition with columns (array of field names). Graceful: skips if the exact same unique constraint already exists. | @@ -655,7 +723,7 @@ function App() { | `useSetAndCommitMutation` | Mutation | setAndCommit | | `useProvisionRelationMutation` | Mutation | Composable relation provisioning: creates FK fields, indexes, unique constraints, and junction tables depending on the relation_type. Supports RelationBelongsTo, RelationHasOne, RelationHasMany, and RelationManyToMany. ManyToMany uses provision_table() internally for junction table creation with full node/grant/policy support. All operations are graceful (skip existing). Returns (out_field_id, out_junction_table_id, out_source_field_id, out_target_field_id). | | `useApplyRlsMutation` | Mutation | applyRls | -| `useSignInOneTimeTokenMutation` | Mutation | signInOneTimeToken | +| `useSignInCrossOriginMutation` | Mutation | signInCrossOrigin | | `useCreateUserDatabaseMutation` | Mutation | Creates a new user database with all required modules, permissions, and RLS policies. Parameters: @@ -674,9 +742,9 @@ Example usage: SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups | | `useExtendTokenExpiresMutation` | Mutation | extendTokenExpires | -| `useSignInMutation` | Mutation | signIn | | `useSignUpMutation` | Mutation | signUp | -| `useOneTimeTokenMutation` | Mutation | oneTimeToken | +| `useRequestCrossOriginTokenMutation` | Mutation | requestCrossOriginToken | +| `useSignInMutation` | Mutation | signIn | | `useProvisionTableMutation` | Mutation | Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields). | | `useSendVerificationEmailMutation` | Mutation | sendVerificationEmail | | `useForgotPasswordMutation` | Mutation | forgotPassword | @@ -928,6 +996,27 @@ const { mutate: create } = useCreateFieldMutation({ create({ databaseId: '', tableId: '', name: '', label: '', description: '', smartTags: '', isRequired: '', apiRequired: '', defaultValue: '', defaultValueAst: '', type: '', fieldOrder: '', regexp: '', chk: '', chkExpr: '', min: '', max: '', tags: '', category: '', module: '', scope: '' }); ``` +### SpatialRelation + +```typescript +// List all spatialRelations +const { data, isLoading } = useSpatialRelationsQuery({ + selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, +}); + +// Get one spatialRelation +const { data: item } = useSpatialRelationQuery({ + id: '', + selection: { fields: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } }, +}); + +// Create a spatialRelation +const { mutate: create } = useCreateSpatialRelationMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', module: '', scope: '', tags: '' }); +``` + ### ForeignKeyConstraint ```typescript @@ -1201,27 +1290,6 @@ const { mutate: create } = useCreateEmbeddingChunkMutation({ create({ databaseId: '', tableId: '', embeddingFieldId: '', chunksTableId: '', chunksTableName: '', contentFieldName: '', dimensions: '', metric: '', chunkSize: '', chunkOverlap: '', chunkStrategy: '', metadataFields: '', enqueueChunkingJob: '', chunkingTaskName: '', parentFkFieldId: '' }); ``` -### TableTemplateModule - -```typescript -// List all tableTemplateModules -const { data, isLoading } = useTableTemplateModulesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true, nodeType: true, data: true } }, -}); - -// Get one tableTemplateModule -const { data: item } = useTableTemplateModuleQuery({ - id: '', - selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true, nodeType: true, data: true } }, -}); - -// Create a tableTemplateModule -const { mutate: create } = useCreateTableTemplateModuleMutation({ - selection: { fields: { id: true } }, -}); -create({ databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '', nodeType: '', data: '' }); -``` - ### SecureTableProvision ```typescript @@ -1264,6 +1332,27 @@ const { mutate: create } = useCreateRelationProvisionMutation({ create({ databaseId: '', relationType: '', sourceTableId: '', targetTableId: '', fieldName: '', deleteAction: '', isRequired: '', apiRequired: '', junctionTableId: '', junctionTableName: '', junctionSchemaId: '', sourceFieldName: '', targetFieldName: '', useCompositeKey: '', createIndex: '', exposeInApi: '', nodes: '', grantRoles: '', grantPrivileges: '', policyType: '', policyPrivileges: '', policyRole: '', policyPermissive: '', policyName: '', policyData: '', outFieldId: '', outJunctionTableId: '', outSourceFieldId: '', outTargetFieldId: '' }); ``` +### SessionSecretsModule + +```typescript +// List all sessionSecretsModules +const { data, isLoading } = useSessionSecretsModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } }, +}); + +// Get one sessionSecretsModule +const { data: item } = useSessionSecretsModuleQuery({ + id: '', + selection: { fields: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } }, +}); + +// Create a sessionSecretsModule +const { mutate: create } = useCreateSessionSecretsModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', schemaId: '', tableId: '', tableName: '', sessionsTableId: '' }); +``` + ### SchemaGrant ```typescript @@ -1794,20 +1883,20 @@ create({ databaseId: '', schemaId: '', tableId: '', tableName: ```typescript // List all membershipsModules const { data, isLoading } = useMembershipsModulesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } }, }); // Get one membershipsModule const { data: item } = useMembershipsModuleQuery({ id: '', - selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } }, }); // Create a membershipsModule const { mutate: create } = useCreateMembershipsModuleMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '' }); +create({ databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', memberProfilesTableId: '' }); ``` ### PermissionsModule @@ -1920,20 +2009,20 @@ create({ databaseId: '', schemaId: '', sessionsTableId: '', se ```typescript // List all userAuthModules const { data, isLoading } = useUserAuthModulesQuery({ - selection: { fields: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } }, }); // Get one userAuthModule const { data: item } = useUserAuthModuleQuery({ id: '', - selection: { fields: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } }, + selection: { fields: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } }, }); // Create a userAuthModule const { mutate: create } = useCreateUserAuthModuleMutation({ selection: { fields: { id: true } }, }); -create({ databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInOneTimeTokenFunction: '', oneTimeTokenFunction: '', extendTokenExpires: '' }); +create({ databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInCrossOriginFunction: '', requestCrossOriginTokenFunction: '', extendTokenExpires: '' }); ``` ### UsersModule @@ -2041,6 +2130,48 @@ const { mutate: create } = useCreateStorageModuleMutation({ create({ databaseId: '', schemaId: '', privateSchemaId: '', bucketsTableId: '', filesTableId: '', uploadRequestsTableId: '', bucketsTableName: '', filesTableName: '', uploadRequestsTableName: '', entityTableId: '', endpoint: '', publicUrlPrefix: '', provider: '', allowedOrigins: '', uploadUrlExpirySeconds: '', downloadUrlExpirySeconds: '', defaultMaxFileSize: '', maxFilenameLength: '', cacheTtlSeconds: '' }); ``` +### EntityTypeProvision + +```typescript +// List all entityTypeProvisions +const { data, isLoading } = useEntityTypeProvisionsQuery({ + selection: { fields: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } }, +}); + +// Get one entityTypeProvision +const { data: item } = useEntityTypeProvisionQuery({ + id: '', + selection: { fields: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } }, +}); + +// Create a entityTypeProvision +const { mutate: create } = useCreateEntityTypeProvisionMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', name: '', prefix: '', description: '', parentEntity: '', tableName: '', isVisible: '', hasLimits: '', hasProfiles: '', hasLevels: '', skipEntityPolicies: '', tableProvision: '', outMembershipType: '', outEntityTableId: '', outEntityTableName: '', outInstalledModules: '' }); +``` + +### WebauthnCredentialsModule + +```typescript +// List all webauthnCredentialsModules +const { data, isLoading } = useWebauthnCredentialsModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } }, +}); + +// Get one webauthnCredentialsModule +const { data: item } = useWebauthnCredentialsModuleQuery({ + id: '', + selection: { fields: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } }, +}); + +// Create a webauthnCredentialsModule +const { mutate: create } = useCreateWebauthnCredentialsModuleMutation({ + selection: { fields: { id: true } }, +}); +create({ databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '' }); +``` + ### DatabaseProvisionModule ```typescript @@ -2130,20 +2261,20 @@ create({ permissions: '', isGrant: '', actorId: '', gr ```typescript // List all orgMemberships const { data, isLoading } = useOrgMembershipsQuery({ - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }, }); // Get one orgMembership const { data: item } = useOrgMembershipQuery({ id: '', - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }, }); // Create a orgMembership const { mutate: create } = useCreateOrgMembershipMutation({ selection: { fields: { id: true } }, }); -create({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }); +create({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }); ``` ### OrgMember @@ -2209,6 +2340,27 @@ const { mutate: create } = useCreateOrgOwnerGrantMutation({ create({ isGrant: '', actorId: '', entityId: '', grantorId: '' }); ``` +### OrgMemberProfile + +```typescript +// List all orgMemberProfiles +const { data, isLoading } = useOrgMemberProfilesQuery({ + selection: { fields: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }, +}); + +// Get one orgMemberProfile +const { data: item } = useOrgMemberProfileQuery({ + id: '', + selection: { fields: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }, +}); + +// Create a orgMemberProfile +const { mutate: create } = useCreateOrgMemberProfileMutation({ + selection: { fields: { id: true } }, +}); +create({ membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }); +``` + ### OrgGrant ```typescript @@ -2461,27 +2613,6 @@ const { mutate: create } = useCreateCryptoAddressMutation({ create({ ownerId: '', address: '', isVerified: '', isPrimary: '' }); ``` -### ConnectedAccount - -```typescript -// List all connectedAccounts -const { data, isLoading } = useConnectedAccountsQuery({ - selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }, -}); - -// Get one connectedAccount -const { data: item } = useConnectedAccountQuery({ - id: '', - selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }, -}); - -// Create a connectedAccount -const { mutate: create } = useCreateConnectedAccountMutation({ - selection: { fields: { id: true } }, -}); -create({ ownerId: '', service: '', identifier: '', details: '', isVerified: '' }); -``` - ### AppInvite ```typescript @@ -2734,25 +2865,46 @@ const { mutate: create } = useCreateOrgLimitDefaultMutation({ create({ name: '', max: '' }); ``` -### MembershipType +### DevicesModule ```typescript -// List all membershipTypes -const { data, isLoading } = useMembershipTypesQuery({ - selection: { fields: { id: true, name: true, description: true, prefix: true } }, +// List all devicesModules +const { data, isLoading } = useDevicesModulesQuery({ + selection: { fields: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } }, }); -// Get one membershipType -const { data: item } = useMembershipTypeQuery({ - id: '', - selection: { fields: { id: true, name: true, description: true, prefix: true } }, +// Get one devicesModule +const { data: item } = useDevicesModuleQuery({ + id: '', + selection: { fields: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } }, }); -// Create a membershipType -const { mutate: create } = useCreateMembershipTypeMutation({ +// Create a devicesModule +const { mutate: create } = useCreateDevicesModuleMutation({ selection: { fields: { id: true } }, }); -create({ name: '', description: '', prefix: '' }); +create({ databaseId: '', schemaId: '', userDevicesTableId: '', deviceSettingsTableId: '', userDevicesTable: '', deviceSettingsTable: '' }); +``` + +### UserConnectedAccount + +```typescript +// List all userConnectedAccounts +const { data, isLoading } = useUserConnectedAccountsQuery({ + selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }, +}); + +// Get one userConnectedAccount +const { data: item } = useUserConnectedAccountQuery({ + id: '', + selection: { fields: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }, +}); + +// Create a userConnectedAccount +const { mutate: create } = useCreateUserConnectedAccountMutation({ + selection: { fields: { id: true } }, +}); +create({ ownerId: '', service: '', identifier: '', details: '', isVerified: '' }); ``` ### AppMembershipDefault @@ -2818,6 +2970,27 @@ const { mutate: create } = useCreateRateLimitsModuleMutation({ create({ databaseId: '', schemaId: '', rateLimitSettingsTableId: '', ipRateLimitsTableId: '', rateLimitsTableId: '', rateLimitSettingsTable: '', ipRateLimitsTable: '', rateLimitsTable: '' }); ``` +### MembershipType + +```typescript +// List all membershipTypes +const { data, isLoading } = useMembershipTypesQuery({ + selection: { fields: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }, +}); + +// Get one membershipType +const { data: item } = useMembershipTypeQuery({ + id: '', + selection: { fields: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }, +}); + +// Create a membershipType +const { mutate: create } = useCreateMembershipTypeMutation({ + selection: { fields: { id: true } }, +}); +create({ name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }); +``` + ### OrgMembershipDefault ```typescript @@ -2928,20 +3101,20 @@ create({ databaseId: '', name: '', requires: '', payload: ```typescript // List all appMemberships const { data, isLoading } = useAppMembershipsQuery({ - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, }); // Get one appMembership const { data: item } = useAppMembershipQuery({ id: '', - selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, + selection: { fields: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }, }); // Create a appMembership const { mutate: create } = useCreateAppMembershipMutation({ selection: { fields: { id: true } }, }); -create({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }); +create({ createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }); ``` ### HierarchyModule @@ -2974,6 +3147,13 @@ currentUserId - **Type:** query - **Arguments:** none +### `useCurrentUserAgentQuery` + +currentUserAgent + +- **Type:** query +- **Arguments:** none + ### `useCurrentIpAddressQuery` currentIpAddress @@ -2981,12 +3161,16 @@ currentIpAddress - **Type:** query - **Arguments:** none -### `useCurrentUserAgentQuery` +### `useRequireStepUpQuery` -currentUserAgent +requireStepUp - **Type:** query -- **Arguments:** none +- **Arguments:** + + | Argument | Type | + |----------|------| + | `stepUpType` | String | ### `useAppPermissionsGetPaddedMaskQuery` @@ -3035,6 +3219,19 @@ revParse | `storeId` | UUID | | `refname` | String | +### `useResolveBlueprintFieldQuery` + +Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `databaseId` | UUID | + | `tableId` | UUID | + | `fieldName` | String | + ### `useOrgIsManagerOfQuery` orgIsManagerOf @@ -3258,6 +3455,39 @@ rejectDatabaseTransfer |----------|------| | `input` | RejectDatabaseTransferInput (required) | +### `useDisconnectAccountMutation` + +disconnectAccount + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DisconnectAccountInput (required) | + +### `useRevokeApiKeyMutation` + +revokeApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeApiKeyInput (required) | + +### `useRevokeSessionMutation` + +revokeSession + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeSessionInput (required) | + ### `useVerifyPasswordMutation` verifyPassword @@ -3370,7 +3600,7 @@ initEmptyRepo ### `useConstructBlueprintMutation` -Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. +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. - **Type:** mutation - **Arguments:** @@ -3379,6 +3609,17 @@ Executes a blueprint definition by delegating to provision_* procedures. Creates |----------|------| | `input` | ConstructBlueprintInput (required) | +### `useProvisionNewUserMutation` + +provisionNewUser + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionNewUserInput (required) | + ### `useResetPasswordMutation` resetPassword @@ -3412,6 +3653,28 @@ Creates a new blueprint by copying a template definition. Checks visibility: own |----------|------| | `input` | CopyTemplateToBlueprintInput (required) | +### `useCreateApiKeyMutation` + +createApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateApiKeyInput (required) | + +### `useProvisionSpatialRelationMutation` + +Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionSpatialRelationInput (required) | + ### `useBootstrapUserMutation` bootstrapUser @@ -3555,16 +3818,16 @@ applyRls |----------|------| | `input` | ApplyRlsInput (required) | -### `useSignInOneTimeTokenMutation` +### `useSignInCrossOriginMutation` -signInOneTimeToken +signInCrossOrigin - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInOneTimeTokenInput (required) | + | `input` | SignInCrossOriginInput (required) | ### `useCreateUserDatabaseMutation` @@ -3604,38 +3867,38 @@ extendTokenExpires |----------|------| | `input` | ExtendTokenExpiresInput (required) | -### `useSignInMutation` +### `useSignUpMutation` -signIn +signUp - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInInput (required) | + | `input` | SignUpInput (required) | -### `useSignUpMutation` +### `useRequestCrossOriginTokenMutation` -signUp +requestCrossOriginToken - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignUpInput (required) | + | `input` | RequestCrossOriginTokenInput (required) | -### `useOneTimeTokenMutation` +### `useSignInMutation` -oneTimeToken +signIn - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | OneTimeTokenInput (required) | + | `input` | SignInInput (required) | ### `useProvisionTableMutation` diff --git a/sdk/constructive-react/src/public/hooks/index.ts b/sdk/constructive-react/src/public/hooks/index.ts index 511194e1f..44afb89b4 100644 --- a/sdk/constructive-react/src/public/hooks/index.ts +++ b/sdk/constructive-react/src/public/hooks/index.ts @@ -2,7 +2,7 @@ * GraphQL SDK * @generated by @constructive-io/graphql-codegen * - * Tables: OrgGetManagersRecord, OrgGetSubordinatesRecord, GetAllRecord, Object, AppPermission, OrgPermission, AppLevelRequirement, Database, Schema, Table, CheckConstraint, Field, ForeignKeyConstraint, FullTextSearch, Index, Policy, PrimaryKeyConstraint, TableGrant, Trigger, UniqueConstraint, View, ViewTable, ViewGrant, ViewRule, EmbeddingChunk, TableTemplateModule, SecureTableProvision, RelationProvision, SchemaGrant, DefaultPrivilege, Enum, ApiSchema, ApiModule, Domain, SiteMetadatum, SiteModule, SiteTheme, TriggerFunction, DatabaseTransfer, Api, Site, App, ConnectedAccountsModule, CryptoAddressesModule, CryptoAuthModule, DefaultIdsModule, DenormalizedTableField, EmailsModule, EncryptedSecretsModule, InvitesModule, LevelsModule, LimitsModule, MembershipTypesModule, MembershipsModule, PermissionsModule, PhoneNumbersModule, ProfilesModule, SecretsModule, SessionsModule, UserAuthModule, UsersModule, Blueprint, BlueprintTemplate, BlueprintConstruction, StorageModule, DatabaseProvisionModule, AppAdminGrant, AppOwnerGrant, AppGrant, OrgMembership, OrgMember, OrgAdminGrant, OrgOwnerGrant, OrgGrant, OrgChartEdge, OrgChartEdgeGrant, OrgPermissionDefault, AppLimit, OrgLimit, AppStep, AppAchievement, AppLevel, Email, PhoneNumber, CryptoAddress, ConnectedAccount, AppInvite, AppClaimedInvite, OrgInvite, OrgClaimedInvite, AuditLog, AppPermissionDefault, Ref, Store, RoleType, MigrateFile, AppLimitDefault, OrgLimitDefault, MembershipType, AppMembershipDefault, Commit, RateLimitsModule, OrgMembershipDefault, RlsModule, SqlAction, User, AstMigration, AppMembership, HierarchyModule + * Tables: OrgGetManagersRecord, OrgGetSubordinatesRecord, GetAllRecord, Object, AppPermission, OrgPermission, AppLevelRequirement, Database, Schema, Table, CheckConstraint, Field, SpatialRelation, ForeignKeyConstraint, FullTextSearch, Index, Policy, PrimaryKeyConstraint, TableGrant, Trigger, UniqueConstraint, View, ViewTable, ViewGrant, ViewRule, EmbeddingChunk, SecureTableProvision, RelationProvision, SessionSecretsModule, SchemaGrant, DefaultPrivilege, Enum, ApiSchema, ApiModule, Domain, SiteMetadatum, SiteModule, SiteTheme, TriggerFunction, DatabaseTransfer, Api, Site, App, ConnectedAccountsModule, CryptoAddressesModule, CryptoAuthModule, DefaultIdsModule, DenormalizedTableField, EmailsModule, EncryptedSecretsModule, InvitesModule, LevelsModule, LimitsModule, MembershipTypesModule, MembershipsModule, PermissionsModule, PhoneNumbersModule, ProfilesModule, SecretsModule, SessionsModule, UserAuthModule, UsersModule, Blueprint, BlueprintTemplate, BlueprintConstruction, StorageModule, EntityTypeProvision, WebauthnCredentialsModule, DatabaseProvisionModule, AppAdminGrant, AppOwnerGrant, AppGrant, OrgMembership, OrgMember, OrgAdminGrant, OrgOwnerGrant, OrgMemberProfile, OrgGrant, OrgChartEdge, OrgChartEdgeGrant, OrgPermissionDefault, AppLimit, OrgLimit, AppStep, AppAchievement, AppLevel, Email, PhoneNumber, CryptoAddress, AppInvite, AppClaimedInvite, OrgInvite, OrgClaimedInvite, AuditLog, AppPermissionDefault, Ref, Store, RoleType, MigrateFile, AppLimitDefault, OrgLimitDefault, DevicesModule, UserConnectedAccount, AppMembershipDefault, Commit, RateLimitsModule, MembershipType, OrgMembershipDefault, RlsModule, SqlAction, User, AstMigration, AppMembership, HierarchyModule * * Usage: * diff --git a/sdk/constructive-react/src/public/hooks/invalidation.ts b/sdk/constructive-react/src/public/hooks/invalidation.ts index 2c0040972..c3ee296dd 100644 --- a/sdk/constructive-react/src/public/hooks/invalidation.ts +++ b/sdk/constructive-react/src/public/hooks/invalidation.ts @@ -27,6 +27,7 @@ import { tableKeys, checkConstraintKeys, fieldKeys, + spatialRelationKeys, foreignKeyConstraintKeys, fullTextSearchKeys, indexKeys, @@ -40,9 +41,9 @@ import { viewGrantKeys, viewRuleKeys, embeddingChunkKeys, - tableTemplateModuleKeys, secureTableProvisionKeys, relationProvisionKeys, + sessionSecretsModuleKeys, schemaGrantKeys, defaultPrivilegeKeys, enumKeys, @@ -80,6 +81,8 @@ import { blueprintTemplateKeys, blueprintConstructionKeys, storageModuleKeys, + entityTypeProvisionKeys, + webauthnCredentialsModuleKeys, databaseProvisionModuleKeys, appAdminGrantKeys, appOwnerGrantKeys, @@ -88,6 +91,7 @@ import { orgMemberKeys, orgAdminGrantKeys, orgOwnerGrantKeys, + orgMemberProfileKeys, orgGrantKeys, orgChartEdgeKeys, orgChartEdgeGrantKeys, @@ -100,7 +104,6 @@ import { emailKeys, phoneNumberKeys, cryptoAddressKeys, - connectedAccountKeys, appInviteKeys, appClaimedInviteKeys, orgInviteKeys, @@ -113,10 +116,12 @@ import { migrateFileKeys, appLimitDefaultKeys, orgLimitDefaultKeys, - membershipTypeKeys, + devicesModuleKeys, + userConnectedAccountKeys, appMembershipDefaultKeys, commitKeys, rateLimitsModuleKeys, + membershipTypeKeys, orgMembershipDefaultKeys, rlsModuleKeys, sqlActionKeys, @@ -334,6 +339,23 @@ export const invalidate = { queryKey: fieldKeys.detail(id), }), }, + /** Invalidate spatialRelation queries */ spatialRelation: { + /** Invalidate all spatialRelation queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: spatialRelationKeys.all, + }), + /** Invalidate spatialRelation list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: spatialRelationKeys.lists(), + }), + /** Invalidate a specific spatialRelation */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: spatialRelationKeys.detail(id), + }), + }, /** Invalidate foreignKeyConstraint queries */ foreignKeyConstraint: { /** Invalidate all foreignKeyConstraint queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -540,23 +562,6 @@ export const invalidate = { queryKey: embeddingChunkKeys.detail(id), }), }, - /** Invalidate tableTemplateModule queries */ tableTemplateModule: { - /** Invalidate all tableTemplateModule queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: tableTemplateModuleKeys.all, - }), - /** Invalidate tableTemplateModule list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: tableTemplateModuleKeys.lists(), - }), - /** Invalidate a specific tableTemplateModule */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: tableTemplateModuleKeys.detail(id), - }), - }, /** Invalidate secureTableProvision queries */ secureTableProvision: { /** Invalidate all secureTableProvision queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -591,6 +596,23 @@ export const invalidate = { queryKey: relationProvisionKeys.detail(id), }), }, + /** Invalidate sessionSecretsModule queries */ sessionSecretsModule: { + /** Invalidate all sessionSecretsModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: sessionSecretsModuleKeys.all, + }), + /** Invalidate sessionSecretsModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: sessionSecretsModuleKeys.lists(), + }), + /** Invalidate a specific sessionSecretsModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: sessionSecretsModuleKeys.detail(id), + }), + }, /** Invalidate schemaGrant queries */ schemaGrant: { /** Invalidate all schemaGrant queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1205,6 +1227,40 @@ export const invalidate = { queryKey: storageModuleKeys.detail(id), }), }, + /** Invalidate entityTypeProvision queries */ entityTypeProvision: { + /** Invalidate all entityTypeProvision queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: entityTypeProvisionKeys.all, + }), + /** Invalidate entityTypeProvision list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: entityTypeProvisionKeys.lists(), + }), + /** Invalidate a specific entityTypeProvision */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: entityTypeProvisionKeys.detail(id), + }), + }, + /** Invalidate webauthnCredentialsModule queries */ webauthnCredentialsModule: { + /** Invalidate all webauthnCredentialsModule queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: webauthnCredentialsModuleKeys.all, + }), + /** Invalidate webauthnCredentialsModule list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: webauthnCredentialsModuleKeys.lists(), + }), + /** Invalidate a specific webauthnCredentialsModule */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: webauthnCredentialsModuleKeys.detail(id), + }), + }, /** Invalidate databaseProvisionModule queries */ databaseProvisionModule: { /** Invalidate all databaseProvisionModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1338,6 +1394,23 @@ export const invalidate = { queryKey: orgOwnerGrantKeys.detail(id), }), }, + /** Invalidate orgMemberProfile queries */ orgMemberProfile: { + /** Invalidate all orgMemberProfile queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.all, + }), + /** Invalidate orgMemberProfile list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.lists(), + }), + /** Invalidate a specific orgMemberProfile */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.detail(id), + }), + }, /** Invalidate orgGrant queries */ orgGrant: { /** Invalidate all orgGrant queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1524,23 +1597,6 @@ export const invalidate = { queryKey: cryptoAddressKeys.detail(id), }), }, - /** Invalidate connectedAccount queries */ connectedAccount: { - /** Invalidate all connectedAccount queries */ all: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.all, - }), - /** Invalidate connectedAccount list queries */ lists: (queryClient: QueryClient) => - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.lists(), - }), - /** Invalidate a specific connectedAccount */ detail: ( - queryClient: QueryClient, - id: string | number - ) => - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.detail(id), - }), - }, /** Invalidate appInvite queries */ appInvite: { /** Invalidate all appInvite queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -1733,21 +1789,38 @@ export const invalidate = { queryKey: orgLimitDefaultKeys.detail(id), }), }, - /** Invalidate membershipType queries */ membershipType: { - /** Invalidate all membershipType queries */ all: (queryClient: QueryClient) => + /** Invalidate devicesModule queries */ devicesModule: { + /** Invalidate all devicesModule queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: membershipTypeKeys.all, + queryKey: devicesModuleKeys.all, }), - /** Invalidate membershipType list queries */ lists: (queryClient: QueryClient) => + /** Invalidate devicesModule list queries */ lists: (queryClient: QueryClient) => queryClient.invalidateQueries({ - queryKey: membershipTypeKeys.lists(), + queryKey: devicesModuleKeys.lists(), }), - /** Invalidate a specific membershipType */ detail: ( + /** Invalidate a specific devicesModule */ detail: ( queryClient: QueryClient, id: string | number ) => queryClient.invalidateQueries({ - queryKey: membershipTypeKeys.detail(id), + queryKey: devicesModuleKeys.detail(id), + }), + }, + /** Invalidate userConnectedAccount queries */ userConnectedAccount: { + /** Invalidate all userConnectedAccount queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: userConnectedAccountKeys.all, + }), + /** Invalidate userConnectedAccount list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: userConnectedAccountKeys.lists(), + }), + /** Invalidate a specific userConnectedAccount */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: userConnectedAccountKeys.detail(id), }), }, /** Invalidate appMembershipDefault queries */ appMembershipDefault: { @@ -1798,6 +1871,23 @@ export const invalidate = { queryKey: rateLimitsModuleKeys.detail(id), }), }, + /** Invalidate membershipType queries */ membershipType: { + /** Invalidate all membershipType queries */ all: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: membershipTypeKeys.all, + }), + /** Invalidate membershipType list queries */ lists: (queryClient: QueryClient) => + queryClient.invalidateQueries({ + queryKey: membershipTypeKeys.lists(), + }), + /** Invalidate a specific membershipType */ detail: ( + queryClient: QueryClient, + id: string | number + ) => + queryClient.invalidateQueries({ + queryKey: membershipTypeKeys.detail(id), + }), + }, /** Invalidate orgMembershipDefault queries */ orgMembershipDefault: { /** Invalidate all orgMembershipDefault queries */ all: (queryClient: QueryClient) => queryClient.invalidateQueries({ @@ -2008,6 +2098,14 @@ export const remove = { queryKey: fieldKeys.detail(id), }); }, + /** Remove spatialRelation from cache */ spatialRelation: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: spatialRelationKeys.detail(id), + }); + }, /** Remove foreignKeyConstraint from cache */ foreignKeyConstraint: ( queryClient: QueryClient, id: string | number @@ -2091,28 +2189,28 @@ export const remove = { queryKey: embeddingChunkKeys.detail(id), }); }, - /** Remove tableTemplateModule from cache */ tableTemplateModule: ( + /** Remove secureTableProvision from cache */ secureTableProvision: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: tableTemplateModuleKeys.detail(id), + queryKey: secureTableProvisionKeys.detail(id), }); }, - /** Remove secureTableProvision from cache */ secureTableProvision: ( + /** Remove relationProvision from cache */ relationProvision: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: secureTableProvisionKeys.detail(id), + queryKey: relationProvisionKeys.detail(id), }); }, - /** Remove relationProvision from cache */ relationProvision: ( + /** Remove sessionSecretsModule from cache */ sessionSecretsModule: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: relationProvisionKeys.detail(id), + queryKey: sessionSecretsModuleKeys.detail(id), }); }, /** Remove schemaGrant from cache */ schemaGrant: ( @@ -2384,6 +2482,22 @@ export const remove = { queryKey: storageModuleKeys.detail(id), }); }, + /** Remove entityTypeProvision from cache */ entityTypeProvision: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: entityTypeProvisionKeys.detail(id), + }); + }, + /** Remove webauthnCredentialsModule from cache */ webauthnCredentialsModule: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: webauthnCredentialsModuleKeys.detail(id), + }); + }, /** Remove databaseProvisionModule from cache */ databaseProvisionModule: ( queryClient: QueryClient, id: string | number @@ -2442,6 +2556,14 @@ export const remove = { queryKey: orgOwnerGrantKeys.detail(id), }); }, + /** Remove orgMemberProfile from cache */ orgMemberProfile: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: orgMemberProfileKeys.detail(id), + }); + }, /** Remove orgGrant from cache */ orgGrant: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: orgGrantKeys.detail(id), @@ -2520,14 +2642,6 @@ export const remove = { queryKey: cryptoAddressKeys.detail(id), }); }, - /** Remove connectedAccount from cache */ connectedAccount: ( - queryClient: QueryClient, - id: string | number - ) => { - queryClient.removeQueries({ - queryKey: connectedAccountKeys.detail(id), - }); - }, /** Remove appInvite from cache */ appInvite: (queryClient: QueryClient, id: string | number) => { queryClient.removeQueries({ queryKey: appInviteKeys.detail(id), @@ -2606,12 +2720,20 @@ export const remove = { queryKey: orgLimitDefaultKeys.detail(id), }); }, - /** Remove membershipType from cache */ membershipType: ( + /** Remove devicesModule from cache */ devicesModule: ( queryClient: QueryClient, id: string | number ) => { queryClient.removeQueries({ - queryKey: membershipTypeKeys.detail(id), + queryKey: devicesModuleKeys.detail(id), + }); + }, + /** Remove userConnectedAccount from cache */ userConnectedAccount: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: userConnectedAccountKeys.detail(id), }); }, /** Remove appMembershipDefault from cache */ appMembershipDefault: ( @@ -2635,6 +2757,14 @@ export const remove = { queryKey: rateLimitsModuleKeys.detail(id), }); }, + /** Remove membershipType from cache */ membershipType: ( + queryClient: QueryClient, + id: string | number + ) => { + queryClient.removeQueries({ + queryKey: membershipTypeKeys.detail(id), + }); + }, /** Remove orgMembershipDefault from cache */ orgMembershipDefault: ( queryClient: QueryClient, id: string | number diff --git a/sdk/constructive-react/src/public/hooks/mutation-keys.ts b/sdk/constructive-react/src/public/hooks/mutation-keys.ts index 6c7f8bf4e..f8d967ff9 100644 --- a/sdk/constructive-react/src/public/hooks/mutation-keys.ts +++ b/sdk/constructive-react/src/public/hooks/mutation-keys.ts @@ -124,6 +124,15 @@ export const fieldMutationKeys = { /** Delete field mutation key */ delete: (id: string | number) => ['mutation', 'field', 'delete', id] as const, } as const; +export const spatialRelationMutationKeys = { + /** All spatialRelation mutation keys */ all: ['mutation', 'spatialrelation'] as const, + /** Create spatialRelation mutation key */ create: () => + ['mutation', 'spatialrelation', 'create'] as const, + /** Update spatialRelation mutation key */ update: (id: string | number) => + ['mutation', 'spatialrelation', 'update', id] as const, + /** Delete spatialRelation mutation key */ delete: (id: string | number) => + ['mutation', 'spatialrelation', 'delete', id] as const, +} as const; export const foreignKeyConstraintMutationKeys = { /** All foreignKeyConstraint mutation keys */ all: ['mutation', 'foreignkeyconstraint'] as const, /** Create foreignKeyConstraint mutation key */ create: () => @@ -233,15 +242,6 @@ export const embeddingChunkMutationKeys = { /** Delete embeddingChunk mutation key */ delete: (id: string | number) => ['mutation', 'embeddingchunk', 'delete', id] as const, } as const; -export const tableTemplateModuleMutationKeys = { - /** All tableTemplateModule mutation keys */ all: ['mutation', 'tabletemplatemodule'] as const, - /** Create tableTemplateModule mutation key */ create: () => - ['mutation', 'tabletemplatemodule', 'create'] as const, - /** Update tableTemplateModule mutation key */ update: (id: string | number) => - ['mutation', 'tabletemplatemodule', 'update', id] as const, - /** Delete tableTemplateModule mutation key */ delete: (id: string | number) => - ['mutation', 'tabletemplatemodule', 'delete', id] as const, -} as const; export const secureTableProvisionMutationKeys = { /** All secureTableProvision mutation keys */ all: ['mutation', 'securetableprovision'] as const, /** Create secureTableProvision mutation key */ create: () => @@ -260,6 +260,15 @@ export const relationProvisionMutationKeys = { /** Delete relationProvision mutation key */ delete: (id: string | number) => ['mutation', 'relationprovision', 'delete', id] as const, } as const; +export const sessionSecretsModuleMutationKeys = { + /** All sessionSecretsModule mutation keys */ all: ['mutation', 'sessionsecretsmodule'] as const, + /** Create sessionSecretsModule mutation key */ create: () => + ['mutation', 'sessionsecretsmodule', 'create'] as const, + /** Update sessionSecretsModule mutation key */ update: (id: string | number) => + ['mutation', 'sessionsecretsmodule', 'update', id] as const, + /** Delete sessionSecretsModule mutation key */ delete: (id: string | number) => + ['mutation', 'sessionsecretsmodule', 'delete', id] as const, +} as const; export const schemaGrantMutationKeys = { /** All schemaGrant mutation keys */ all: ['mutation', 'schemagrant'] as const, /** Create schemaGrant mutation key */ create: () => @@ -601,6 +610,27 @@ export const storageModuleMutationKeys = { /** Delete storageModule mutation key */ delete: (id: string | number) => ['mutation', 'storagemodule', 'delete', id] as const, } as const; +export const entityTypeProvisionMutationKeys = { + /** All entityTypeProvision mutation keys */ all: ['mutation', 'entitytypeprovision'] as const, + /** Create entityTypeProvision mutation key */ create: () => + ['mutation', 'entitytypeprovision', 'create'] as const, + /** Update entityTypeProvision mutation key */ update: (id: string | number) => + ['mutation', 'entitytypeprovision', 'update', id] as const, + /** Delete entityTypeProvision mutation key */ delete: (id: string | number) => + ['mutation', 'entitytypeprovision', 'delete', id] as const, +} as const; +export const webauthnCredentialsModuleMutationKeys = { + /** All webauthnCredentialsModule mutation keys */ all: [ + 'mutation', + 'webauthncredentialsmodule', + ] as const, + /** Create webauthnCredentialsModule mutation key */ create: () => + ['mutation', 'webauthncredentialsmodule', 'create'] as const, + /** Update webauthnCredentialsModule mutation key */ update: (id: string | number) => + ['mutation', 'webauthncredentialsmodule', 'update', id] as const, + /** Delete webauthnCredentialsModule mutation key */ delete: (id: string | number) => + ['mutation', 'webauthncredentialsmodule', 'delete', id] as const, +} as const; export const databaseProvisionModuleMutationKeys = { /** All databaseProvisionModule mutation keys */ all: [ 'mutation', @@ -674,6 +704,15 @@ export const orgOwnerGrantMutationKeys = { /** Delete orgOwnerGrant mutation key */ delete: (id: string | number) => ['mutation', 'orgownergrant', 'delete', id] as const, } as const; +export const orgMemberProfileMutationKeys = { + /** All orgMemberProfile mutation keys */ all: ['mutation', 'orgmemberprofile'] as const, + /** Create orgMemberProfile mutation key */ create: () => + ['mutation', 'orgmemberprofile', 'create'] as const, + /** Update orgMemberProfile mutation key */ update: (id: string | number) => + ['mutation', 'orgmemberprofile', 'update', id] as const, + /** Delete orgMemberProfile mutation key */ delete: (id: string | number) => + ['mutation', 'orgmemberprofile', 'delete', id] as const, +} as const; export const orgGrantMutationKeys = { /** All orgGrant mutation keys */ all: ['mutation', 'orggrant'] as const, /** Create orgGrant mutation key */ create: () => ['mutation', 'orggrant', 'create'] as const, @@ -776,15 +815,6 @@ export const cryptoAddressMutationKeys = { /** Delete cryptoAddress mutation key */ delete: (id: string | number) => ['mutation', 'cryptoaddress', 'delete', id] as const, } as const; -export const connectedAccountMutationKeys = { - /** All connectedAccount mutation keys */ all: ['mutation', 'connectedaccount'] as const, - /** Create connectedAccount mutation key */ create: () => - ['mutation', 'connectedaccount', 'create'] as const, - /** Update connectedAccount mutation key */ update: (id: string | number) => - ['mutation', 'connectedaccount', 'update', id] as const, - /** Delete connectedAccount mutation key */ delete: (id: string | number) => - ['mutation', 'connectedaccount', 'delete', id] as const, -} as const; export const appInviteMutationKeys = { /** All appInvite mutation keys */ all: ['mutation', 'appinvite'] as const, /** Create appInvite mutation key */ create: () => ['mutation', 'appinvite', 'create'] as const, @@ -887,14 +917,23 @@ export const orgLimitDefaultMutationKeys = { /** Delete orgLimitDefault mutation key */ delete: (id: string | number) => ['mutation', 'orglimitdefault', 'delete', id] as const, } as const; -export const membershipTypeMutationKeys = { - /** All membershipType mutation keys */ all: ['mutation', 'membershiptype'] as const, - /** Create membershipType mutation key */ create: () => - ['mutation', 'membershiptype', 'create'] as const, - /** Update membershipType mutation key */ update: (id: string | number) => - ['mutation', 'membershiptype', 'update', id] as const, - /** Delete membershipType mutation key */ delete: (id: string | number) => - ['mutation', 'membershiptype', 'delete', id] as const, +export const devicesModuleMutationKeys = { + /** All devicesModule mutation keys */ all: ['mutation', 'devicesmodule'] as const, + /** Create devicesModule mutation key */ create: () => + ['mutation', 'devicesmodule', 'create'] as const, + /** Update devicesModule mutation key */ update: (id: string | number) => + ['mutation', 'devicesmodule', 'update', id] as const, + /** Delete devicesModule mutation key */ delete: (id: string | number) => + ['mutation', 'devicesmodule', 'delete', id] as const, +} as const; +export const userConnectedAccountMutationKeys = { + /** All userConnectedAccount mutation keys */ all: ['mutation', 'userconnectedaccount'] as const, + /** Create userConnectedAccount mutation key */ create: () => + ['mutation', 'userconnectedaccount', 'create'] as const, + /** Update userConnectedAccount mutation key */ update: (id: string | number) => + ['mutation', 'userconnectedaccount', 'update', id] as const, + /** Delete userConnectedAccount mutation key */ delete: (id: string | number) => + ['mutation', 'userconnectedaccount', 'delete', id] as const, } as const; export const appMembershipDefaultMutationKeys = { /** All appMembershipDefault mutation keys */ all: ['mutation', 'appmembershipdefault'] as const, @@ -922,6 +961,15 @@ export const rateLimitsModuleMutationKeys = { /** Delete rateLimitsModule mutation key */ delete: (id: string | number) => ['mutation', 'ratelimitsmodule', 'delete', id] as const, } as const; +export const membershipTypeMutationKeys = { + /** All membershipType mutation keys */ all: ['mutation', 'membershiptype'] as const, + /** Create membershipType mutation key */ create: () => + ['mutation', 'membershiptype', 'create'] as const, + /** Update membershipType mutation key */ update: (id: string | number) => + ['mutation', 'membershiptype', 'update', id] as const, + /** Delete membershipType mutation key */ delete: (id: string | number) => + ['mutation', 'membershiptype', 'delete', id] as const, +} as const; export const orgMembershipDefaultMutationKeys = { /** All orgMembershipDefault mutation keys */ all: ['mutation', 'orgmembershipdefault'] as const, /** Create orgMembershipDefault mutation key */ create: () => @@ -1010,6 +1058,18 @@ export const customMutationKeys = { identifier ? (['mutation', 'rejectDatabaseTransfer', identifier] as const) : (['mutation', 'rejectDatabaseTransfer'] as const), + /** Mutation key for disconnectAccount */ disconnectAccount: (identifier?: string) => + identifier + ? (['mutation', 'disconnectAccount', identifier] as const) + : (['mutation', 'disconnectAccount'] as const), + /** Mutation key for revokeApiKey */ revokeApiKey: (identifier?: string) => + identifier + ? (['mutation', 'revokeApiKey', identifier] as const) + : (['mutation', 'revokeApiKey'] as const), + /** Mutation key for revokeSession */ revokeSession: (identifier?: string) => + identifier + ? (['mutation', 'revokeSession', identifier] as const) + : (['mutation', 'revokeSession'] as const), /** Mutation key for verifyPassword */ verifyPassword: (identifier?: string) => identifier ? (['mutation', 'verifyPassword', identifier] as const) @@ -1054,6 +1114,10 @@ export const customMutationKeys = { identifier ? (['mutation', 'constructBlueprint', identifier] as const) : (['mutation', 'constructBlueprint'] as const), + /** Mutation key for provisionNewUser */ provisionNewUser: (identifier?: string) => + identifier + ? (['mutation', 'provisionNewUser', identifier] as const) + : (['mutation', 'provisionNewUser'] as const), /** Mutation key for resetPassword */ resetPassword: (identifier?: string) => identifier ? (['mutation', 'resetPassword', identifier] as const) @@ -1066,6 +1130,16 @@ export const customMutationKeys = { identifier ? (['mutation', 'copyTemplateToBlueprint', identifier] as const) : (['mutation', 'copyTemplateToBlueprint'] as const), + /** Mutation key for createApiKey */ createApiKey: (identifier?: string) => + identifier + ? (['mutation', 'createApiKey', identifier] as const) + : (['mutation', 'createApiKey'] as const), + /** Mutation key for provisionSpatialRelation */ provisionSpatialRelation: ( + identifier?: string + ) => + identifier + ? (['mutation', 'provisionSpatialRelation', identifier] as const) + : (['mutation', 'provisionSpatialRelation'] as const), /** Mutation key for bootstrapUser */ bootstrapUser: (identifier?: string) => identifier ? (['mutation', 'bootstrapUser', identifier] as const) @@ -1122,10 +1196,10 @@ export const customMutationKeys = { identifier ? (['mutation', 'applyRls', identifier] as const) : (['mutation', 'applyRls'] as const), - /** Mutation key for signInOneTimeToken */ signInOneTimeToken: (identifier?: string) => + /** Mutation key for signInCrossOrigin */ signInCrossOrigin: (identifier?: string) => identifier - ? (['mutation', 'signInOneTimeToken', identifier] as const) - : (['mutation', 'signInOneTimeToken'] as const), + ? (['mutation', 'signInCrossOrigin', identifier] as const) + : (['mutation', 'signInCrossOrigin'] as const), /** Mutation key for createUserDatabase */ createUserDatabase: (identifier?: string) => identifier ? (['mutation', 'createUserDatabase', identifier] as const) @@ -1134,14 +1208,14 @@ export const customMutationKeys = { identifier ? (['mutation', 'extendTokenExpires', identifier] as const) : (['mutation', 'extendTokenExpires'] as const), - /** Mutation key for signIn */ signIn: (identifier?: string) => - identifier ? (['mutation', 'signIn', identifier] as const) : (['mutation', 'signIn'] as const), /** Mutation key for signUp */ signUp: (identifier?: string) => identifier ? (['mutation', 'signUp', identifier] as const) : (['mutation', 'signUp'] as const), - /** Mutation key for oneTimeToken */ oneTimeToken: (identifier?: string) => + /** Mutation key for requestCrossOriginToken */ requestCrossOriginToken: (identifier?: string) => identifier - ? (['mutation', 'oneTimeToken', identifier] as const) - : (['mutation', 'oneTimeToken'] as const), + ? (['mutation', 'requestCrossOriginToken', identifier] as const) + : (['mutation', 'requestCrossOriginToken'] as const), + /** Mutation key for signIn */ signIn: (identifier?: string) => + identifier ? (['mutation', 'signIn', identifier] as const) : (['mutation', 'signIn'] as const), /** Mutation key for provisionTable */ provisionTable: (identifier?: string) => identifier ? (['mutation', 'provisionTable', identifier] as const) @@ -1202,6 +1276,7 @@ export const mutationKeys = { table: tableMutationKeys, checkConstraint: checkConstraintMutationKeys, field: fieldMutationKeys, + spatialRelation: spatialRelationMutationKeys, foreignKeyConstraint: foreignKeyConstraintMutationKeys, fullTextSearch: fullTextSearchMutationKeys, index: indexMutationKeys, @@ -1215,9 +1290,9 @@ export const mutationKeys = { viewGrant: viewGrantMutationKeys, viewRule: viewRuleMutationKeys, embeddingChunk: embeddingChunkMutationKeys, - tableTemplateModule: tableTemplateModuleMutationKeys, secureTableProvision: secureTableProvisionMutationKeys, relationProvision: relationProvisionMutationKeys, + sessionSecretsModule: sessionSecretsModuleMutationKeys, schemaGrant: schemaGrantMutationKeys, defaultPrivilege: defaultPrivilegeMutationKeys, enum: enumMutationKeys, @@ -1255,6 +1330,8 @@ export const mutationKeys = { blueprintTemplate: blueprintTemplateMutationKeys, blueprintConstruction: blueprintConstructionMutationKeys, storageModule: storageModuleMutationKeys, + entityTypeProvision: entityTypeProvisionMutationKeys, + webauthnCredentialsModule: webauthnCredentialsModuleMutationKeys, databaseProvisionModule: databaseProvisionModuleMutationKeys, appAdminGrant: appAdminGrantMutationKeys, appOwnerGrant: appOwnerGrantMutationKeys, @@ -1263,6 +1340,7 @@ export const mutationKeys = { orgMember: orgMemberMutationKeys, orgAdminGrant: orgAdminGrantMutationKeys, orgOwnerGrant: orgOwnerGrantMutationKeys, + orgMemberProfile: orgMemberProfileMutationKeys, orgGrant: orgGrantMutationKeys, orgChartEdge: orgChartEdgeMutationKeys, orgChartEdgeGrant: orgChartEdgeGrantMutationKeys, @@ -1275,7 +1353,6 @@ export const mutationKeys = { email: emailMutationKeys, phoneNumber: phoneNumberMutationKeys, cryptoAddress: cryptoAddressMutationKeys, - connectedAccount: connectedAccountMutationKeys, appInvite: appInviteMutationKeys, appClaimedInvite: appClaimedInviteMutationKeys, orgInvite: orgInviteMutationKeys, @@ -1288,10 +1365,12 @@ export const mutationKeys = { migrateFile: migrateFileMutationKeys, appLimitDefault: appLimitDefaultMutationKeys, orgLimitDefault: orgLimitDefaultMutationKeys, - membershipType: membershipTypeMutationKeys, + devicesModule: devicesModuleMutationKeys, + userConnectedAccount: userConnectedAccountMutationKeys, appMembershipDefault: appMembershipDefaultMutationKeys, commit: commitMutationKeys, rateLimitsModule: rateLimitsModuleMutationKeys, + membershipType: membershipTypeMutationKeys, orgMembershipDefault: orgMembershipDefaultMutationKeys, rlsModule: rlsModuleMutationKeys, sqlAction: sqlActionMutationKeys, diff --git a/sdk/constructive-react/src/public/hooks/mutations/index.ts b/sdk/constructive-react/src/public/hooks/mutations/index.ts index 5208ff2b8..e47e70e49 100644 --- a/sdk/constructive-react/src/public/hooks/mutations/index.ts +++ b/sdk/constructive-react/src/public/hooks/mutations/index.ts @@ -33,6 +33,9 @@ export * from './useDeleteCheckConstraintMutation'; export * from './useCreateFieldMutation'; export * from './useUpdateFieldMutation'; export * from './useDeleteFieldMutation'; +export * from './useCreateSpatialRelationMutation'; +export * from './useUpdateSpatialRelationMutation'; +export * from './useDeleteSpatialRelationMutation'; export * from './useCreateForeignKeyConstraintMutation'; export * from './useUpdateForeignKeyConstraintMutation'; export * from './useDeleteForeignKeyConstraintMutation'; @@ -72,15 +75,15 @@ export * from './useDeleteViewRuleMutation'; export * from './useCreateEmbeddingChunkMutation'; export * from './useUpdateEmbeddingChunkMutation'; export * from './useDeleteEmbeddingChunkMutation'; -export * from './useCreateTableTemplateModuleMutation'; -export * from './useUpdateTableTemplateModuleMutation'; -export * from './useDeleteTableTemplateModuleMutation'; export * from './useCreateSecureTableProvisionMutation'; export * from './useUpdateSecureTableProvisionMutation'; export * from './useDeleteSecureTableProvisionMutation'; export * from './useCreateRelationProvisionMutation'; export * from './useUpdateRelationProvisionMutation'; export * from './useDeleteRelationProvisionMutation'; +export * from './useCreateSessionSecretsModuleMutation'; +export * from './useUpdateSessionSecretsModuleMutation'; +export * from './useDeleteSessionSecretsModuleMutation'; export * from './useCreateSchemaGrantMutation'; export * from './useUpdateSchemaGrantMutation'; export * from './useDeleteSchemaGrantMutation'; @@ -192,6 +195,12 @@ export * from './useDeleteBlueprintConstructionMutation'; export * from './useCreateStorageModuleMutation'; export * from './useUpdateStorageModuleMutation'; export * from './useDeleteStorageModuleMutation'; +export * from './useCreateEntityTypeProvisionMutation'; +export * from './useUpdateEntityTypeProvisionMutation'; +export * from './useDeleteEntityTypeProvisionMutation'; +export * from './useCreateWebauthnCredentialsModuleMutation'; +export * from './useUpdateWebauthnCredentialsModuleMutation'; +export * from './useDeleteWebauthnCredentialsModuleMutation'; export * from './useCreateDatabaseProvisionModuleMutation'; export * from './useUpdateDatabaseProvisionModuleMutation'; export * from './useDeleteDatabaseProvisionModuleMutation'; @@ -216,6 +225,9 @@ export * from './useDeleteOrgAdminGrantMutation'; export * from './useCreateOrgOwnerGrantMutation'; export * from './useUpdateOrgOwnerGrantMutation'; export * from './useDeleteOrgOwnerGrantMutation'; +export * from './useCreateOrgMemberProfileMutation'; +export * from './useUpdateOrgMemberProfileMutation'; +export * from './useDeleteOrgMemberProfileMutation'; export * from './useCreateOrgGrantMutation'; export * from './useUpdateOrgGrantMutation'; export * from './useDeleteOrgGrantMutation'; @@ -252,9 +264,6 @@ export * from './useDeletePhoneNumberMutation'; export * from './useCreateCryptoAddressMutation'; export * from './useUpdateCryptoAddressMutation'; export * from './useDeleteCryptoAddressMutation'; -export * from './useCreateConnectedAccountMutation'; -export * from './useUpdateConnectedAccountMutation'; -export * from './useDeleteConnectedAccountMutation'; export * from './useCreateAppInviteMutation'; export * from './useUpdateAppInviteMutation'; export * from './useDeleteAppInviteMutation'; @@ -289,9 +298,10 @@ export * from './useDeleteAppLimitDefaultMutation'; export * from './useCreateOrgLimitDefaultMutation'; export * from './useUpdateOrgLimitDefaultMutation'; export * from './useDeleteOrgLimitDefaultMutation'; -export * from './useCreateMembershipTypeMutation'; -export * from './useUpdateMembershipTypeMutation'; -export * from './useDeleteMembershipTypeMutation'; +export * from './useCreateDevicesModuleMutation'; +export * from './useUpdateDevicesModuleMutation'; +export * from './useDeleteDevicesModuleMutation'; +export * from './useCreateUserConnectedAccountMutation'; export * from './useCreateAppMembershipDefaultMutation'; export * from './useUpdateAppMembershipDefaultMutation'; export * from './useDeleteAppMembershipDefaultMutation'; @@ -301,6 +311,9 @@ export * from './useDeleteCommitMutation'; export * from './useCreateRateLimitsModuleMutation'; export * from './useUpdateRateLimitsModuleMutation'; export * from './useDeleteRateLimitsModuleMutation'; +export * from './useCreateMembershipTypeMutation'; +export * from './useUpdateMembershipTypeMutation'; +export * from './useDeleteMembershipTypeMutation'; export * from './useCreateOrgMembershipDefaultMutation'; export * from './useUpdateOrgMembershipDefaultMutation'; export * from './useDeleteOrgMembershipDefaultMutation'; @@ -323,6 +336,9 @@ export * from './useSignOutMutation'; export * from './useAcceptDatabaseTransferMutation'; export * from './useCancelDatabaseTransferMutation'; export * from './useRejectDatabaseTransferMutation'; +export * from './useDisconnectAccountMutation'; +export * from './useRevokeApiKeyMutation'; +export * from './useRevokeSessionMutation'; export * from './useVerifyPasswordMutation'; export * from './useVerifyTotpMutation'; export * from './useSubmitAppInviteCodeMutation'; @@ -334,9 +350,12 @@ export * from './useVerifyEmailMutation'; export * from './useFreezeObjectsMutation'; export * from './useInitEmptyRepoMutation'; export * from './useConstructBlueprintMutation'; +export * from './useProvisionNewUserMutation'; export * from './useResetPasswordMutation'; export * from './useRemoveNodeAtPathMutation'; export * from './useCopyTemplateToBlueprintMutation'; +export * from './useCreateApiKeyMutation'; +export * from './useProvisionSpatialRelationMutation'; export * from './useBootstrapUserMutation'; export * from './useSetFieldOrderMutation'; export * from './useProvisionUniqueConstraintMutation'; @@ -350,12 +369,12 @@ export * from './useUpdateNodeAtPathMutation'; export * from './useSetAndCommitMutation'; export * from './useProvisionRelationMutation'; export * from './useApplyRlsMutation'; -export * from './useSignInOneTimeTokenMutation'; +export * from './useSignInCrossOriginMutation'; export * from './useCreateUserDatabaseMutation'; export * from './useExtendTokenExpiresMutation'; -export * from './useSignInMutation'; export * from './useSignUpMutation'; -export * from './useOneTimeTokenMutation'; +export * from './useRequestCrossOriginTokenMutation'; +export * from './useSignInMutation'; export * from './useProvisionTableMutation'; export * from './useSendVerificationEmailMutation'; export * from './useForgotPasswordMutation'; diff --git a/sdk/constructive-react/src/public/hooks/mutations/useCreateApiKeyMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useCreateApiKeyMutation.ts new file mode 100644 index 000000000..bd74ac134 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useCreateApiKeyMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for createApiKey + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { CreateApiKeyVariables } from '../../orm/mutation'; +import type { CreateApiKeyPayloadSelect, CreateApiKeyPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { CreateApiKeyVariables } from '../../orm/mutation'; +export type { CreateApiKeyPayloadSelect } from '../../orm/input-types'; +export function useCreateApiKeyMutation( + params: { + selection: { + fields: S & CreateApiKeyPayloadSelect; + } & HookStrictSelect, CreateApiKeyPayloadSelect>; + } & Omit< + UseMutationOptions< + { + createApiKey: InferSelectResult | null; + }, + Error, + CreateApiKeyVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + createApiKey: InferSelectResult | null; + }, + Error, + CreateApiKeyVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.createApiKey(), + mutationFn: (variables: CreateApiKeyVariables) => + getClient() + .mutation.createApiKey(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useCreateConnectedAccountMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useCreateConnectedAccountMutation.ts deleted file mode 100644 index b07049d9a..000000000 --- a/sdk/constructive-react/src/public/hooks/mutations/useCreateConnectedAccountMutation.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * OAuth and social login connections linking external service accounts to users - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { connectedAccountKeys } from '../query-keys'; -import { connectedAccountMutationKeys } from '../mutation-keys'; -import type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - CreateConnectedAccountInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - CreateConnectedAccountInput, -} from '../../orm/input-types'; -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateConnectedAccountMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateConnectedAccountMutation( - params: { - selection: { - fields: S & ConnectedAccountSelect; - } & HookStrictSelect, ConnectedAccountSelect>; - } & Omit< - UseMutationOptions< - { - createConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }, - Error, - CreateConnectedAccountInput['connectedAccount'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }, - Error, - CreateConnectedAccountInput['connectedAccount'] ->; -export function useCreateConnectedAccountMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: connectedAccountMutationKeys.create(), - mutationFn: (data: CreateConnectedAccountInput['connectedAccount']) => - getClient() - .connectedAccount.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useCreateDevicesModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useCreateDevicesModuleMutation.ts new file mode 100644 index 000000000..b78a87493 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useCreateDevicesModuleMutation.ts @@ -0,0 +1,88 @@ +/** + * Create mutation hook for DevicesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { devicesModuleKeys } from '../query-keys'; +import { devicesModuleMutationKeys } from '../mutation-keys'; +import type { + DevicesModuleSelect, + DevicesModuleWithRelations, + CreateDevicesModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + DevicesModuleSelect, + DevicesModuleWithRelations, + CreateDevicesModuleInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a DevicesModule + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateDevicesModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateDevicesModuleMutation( + params: { + selection: { + fields: S & DevicesModuleSelect; + } & HookStrictSelect, DevicesModuleSelect>; + } & Omit< + UseMutationOptions< + { + createDevicesModule: { + devicesModule: InferSelectResult; + }; + }, + Error, + CreateDevicesModuleInput['devicesModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createDevicesModule: { + devicesModule: InferSelectResult; + }; + }, + Error, + CreateDevicesModuleInput['devicesModule'] +>; +export function useCreateDevicesModuleMutation( + params: { + selection: SelectionConfig; + } & Omit, 'mutationFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: devicesModuleMutationKeys.create(), + mutationFn: (data: CreateDevicesModuleInput['devicesModule']) => + getClient() + .devicesModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: devicesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useCreateEntityTypeProvisionMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useCreateEntityTypeProvisionMutation.ts new file mode 100644 index 000000000..70139cea1 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useCreateEntityTypeProvisionMutation.ts @@ -0,0 +1,105 @@ +/** + * 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. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { entityTypeProvisionKeys } from '../query-keys'; +import { entityTypeProvisionMutationKeys } from '../mutation-keys'; +import type { + EntityTypeProvisionSelect, + EntityTypeProvisionWithRelations, + CreateEntityTypeProvisionInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EntityTypeProvisionSelect, + EntityTypeProvisionWithRelations, + CreateEntityTypeProvisionInput, +} from '../../orm/input-types'; +/** + * 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. + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateEntityTypeProvisionMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateEntityTypeProvisionMutation( + params: { + selection: { + fields: S & EntityTypeProvisionSelect; + } & HookStrictSelect, EntityTypeProvisionSelect>; + } & Omit< + UseMutationOptions< + { + createEntityTypeProvision: { + entityTypeProvision: InferSelectResult; + }; + }, + Error, + CreateEntityTypeProvisionInput['entityTypeProvision'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createEntityTypeProvision: { + entityTypeProvision: InferSelectResult; + }; + }, + Error, + CreateEntityTypeProvisionInput['entityTypeProvision'] +>; +export function useCreateEntityTypeProvisionMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: entityTypeProvisionMutationKeys.create(), + mutationFn: (data: CreateEntityTypeProvisionInput['entityTypeProvision']) => + getClient() + .entityTypeProvision.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: entityTypeProvisionKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useCreateOrgMemberProfileMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useCreateOrgMemberProfileMutation.ts new file mode 100644 index 000000000..90480b1cc --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useCreateOrgMemberProfileMutation.ts @@ -0,0 +1,91 @@ +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { orgMemberProfileKeys } from '../query-keys'; +import { orgMemberProfileMutationKeys } from '../mutation-keys'; +import type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + CreateOrgMemberProfileInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + CreateOrgMemberProfileInput, +} from '../../orm/input-types'; +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateOrgMemberProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateOrgMemberProfileMutation( + params: { + selection: { + fields: S & OrgMemberProfileSelect; + } & HookStrictSelect, OrgMemberProfileSelect>; + } & Omit< + UseMutationOptions< + { + createOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }, + Error, + CreateOrgMemberProfileInput['orgMemberProfile'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }, + Error, + CreateOrgMemberProfileInput['orgMemberProfile'] +>; +export function useCreateOrgMemberProfileMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgMemberProfileMutationKeys.create(), + mutationFn: (data: CreateOrgMemberProfileInput['orgMemberProfile']) => + getClient() + .orgMemberProfile.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useCreateSessionSecretsModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useCreateSessionSecretsModuleMutation.ts new file mode 100644 index 000000000..d4447ff4b --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useCreateSessionSecretsModuleMutation.ts @@ -0,0 +1,91 @@ +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { sessionSecretsModuleKeys } from '../query-keys'; +import { sessionSecretsModuleMutationKeys } from '../mutation-keys'; +import type { + SessionSecretsModuleSelect, + SessionSecretsModuleWithRelations, + CreateSessionSecretsModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + SessionSecretsModuleSelect, + SessionSecretsModuleWithRelations, + CreateSessionSecretsModuleInput, +} from '../../orm/input-types'; +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateSessionSecretsModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateSessionSecretsModuleMutation( + params: { + selection: { + fields: S & SessionSecretsModuleSelect; + } & HookStrictSelect, SessionSecretsModuleSelect>; + } & Omit< + UseMutationOptions< + { + createSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }, + Error, + CreateSessionSecretsModuleInput['sessionSecretsModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }, + Error, + CreateSessionSecretsModuleInput['sessionSecretsModule'] +>; +export function useCreateSessionSecretsModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: sessionSecretsModuleMutationKeys.create(), + mutationFn: (data: CreateSessionSecretsModuleInput['sessionSecretsModule']) => + getClient() + .sessionSecretsModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: sessionSecretsModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useCreateSpatialRelationMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useCreateSpatialRelationMutation.ts new file mode 100644 index 000000000..6b3aae995 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useCreateSpatialRelationMutation.ts @@ -0,0 +1,91 @@ +/** + * Create mutation hook for SpatialRelation + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { spatialRelationKeys } from '../query-keys'; +import { spatialRelationMutationKeys } from '../mutation-keys'; +import type { + SpatialRelationSelect, + SpatialRelationWithRelations, + CreateSpatialRelationInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + SpatialRelationSelect, + SpatialRelationWithRelations, + CreateSpatialRelationInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a SpatialRelation + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateSpatialRelationMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateSpatialRelationMutation( + params: { + selection: { + fields: S & SpatialRelationSelect; + } & HookStrictSelect, SpatialRelationSelect>; + } & Omit< + UseMutationOptions< + { + createSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }, + Error, + CreateSpatialRelationInput['spatialRelation'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }, + Error, + CreateSpatialRelationInput['spatialRelation'] +>; +export function useCreateSpatialRelationMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: spatialRelationMutationKeys.create(), + mutationFn: (data: CreateSpatialRelationInput['spatialRelation']) => + getClient() + .spatialRelation.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: spatialRelationKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useCreateTableTemplateModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useCreateTableTemplateModuleMutation.ts deleted file mode 100644 index af6255e35..000000000 --- a/sdk/constructive-react/src/public/hooks/mutations/useCreateTableTemplateModuleMutation.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Create mutation hook for TableTemplateModule - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { tableTemplateModuleKeys } from '../query-keys'; -import { tableTemplateModuleMutationKeys } from '../mutation-keys'; -import type { - TableTemplateModuleSelect, - TableTemplateModuleWithRelations, - CreateTableTemplateModuleInput, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - TableTemplateModuleSelect, - TableTemplateModuleWithRelations, - CreateTableTemplateModuleInput, -} from '../../orm/input-types'; -/** - * Mutation hook for creating a TableTemplateModule - * - * @example - * ```tsx - * const { mutate, isPending } = useCreateTableTemplateModuleMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ name: 'New item' }); - * ``` - */ -export function useCreateTableTemplateModuleMutation( - params: { - selection: { - fields: S & TableTemplateModuleSelect; - } & HookStrictSelect, TableTemplateModuleSelect>; - } & Omit< - UseMutationOptions< - { - createTableTemplateModule: { - tableTemplateModule: InferSelectResult; - }; - }, - Error, - CreateTableTemplateModuleInput['tableTemplateModule'] - >, - 'mutationFn' - > -): UseMutationResult< - { - createTableTemplateModule: { - tableTemplateModule: InferSelectResult; - }; - }, - Error, - CreateTableTemplateModuleInput['tableTemplateModule'] ->; -export function useCreateTableTemplateModuleMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: tableTemplateModuleMutationKeys.create(), - mutationFn: (data: CreateTableTemplateModuleInput['tableTemplateModule']) => - getClient() - .tableTemplateModule.create({ - data, - select: args.select, - }) - .unwrap(), - onSuccess: () => { - queryClient.invalidateQueries({ - queryKey: tableTemplateModuleKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useCreateUserConnectedAccountMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useCreateUserConnectedAccountMutation.ts new file mode 100644 index 000000000..6c0f3a519 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useCreateUserConnectedAccountMutation.ts @@ -0,0 +1,91 @@ +/** + * Create mutation hook for UserConnectedAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { userConnectedAccountKeys } from '../query-keys'; +import { userConnectedAccountMutationKeys } from '../mutation-keys'; +import type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, + CreateUserConnectedAccountInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, + CreateUserConnectedAccountInput, +} from '../../orm/input-types'; +/** + * Mutation hook for creating a UserConnectedAccount + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateUserConnectedAccountMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateUserConnectedAccountMutation( + params: { + selection: { + fields: S & UserConnectedAccountSelect; + } & HookStrictSelect, UserConnectedAccountSelect>; + } & Omit< + UseMutationOptions< + { + createUserConnectedAccount: { + userConnectedAccount: InferSelectResult; + }; + }, + Error, + CreateUserConnectedAccountInput['userConnectedAccount'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createUserConnectedAccount: { + userConnectedAccount: InferSelectResult; + }; + }, + Error, + CreateUserConnectedAccountInput['userConnectedAccount'] +>; +export function useCreateUserConnectedAccountMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: userConnectedAccountMutationKeys.create(), + mutationFn: (data: CreateUserConnectedAccountInput['userConnectedAccount']) => + getClient() + .userConnectedAccount.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: userConnectedAccountKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useCreateWebauthnCredentialsModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useCreateWebauthnCredentialsModuleMutation.ts new file mode 100644 index 000000000..c1fc11467 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useCreateWebauthnCredentialsModuleMutation.ts @@ -0,0 +1,97 @@ +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { webauthnCredentialsModuleKeys } from '../query-keys'; +import { webauthnCredentialsModuleMutationKeys } from '../mutation-keys'; +import type { + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleWithRelations, + CreateWebauthnCredentialsModuleInput, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleWithRelations, + CreateWebauthnCredentialsModuleInput, +} from '../../orm/input-types'; +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * + * @example + * ```tsx + * const { mutate, isPending } = useCreateWebauthnCredentialsModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ name: 'New item' }); + * ``` + */ +export function useCreateWebauthnCredentialsModuleMutation< + S extends WebauthnCredentialsModuleSelect, +>( + params: { + selection: { + fields: S & WebauthnCredentialsModuleSelect; + } & HookStrictSelect, WebauthnCredentialsModuleSelect>; + } & Omit< + UseMutationOptions< + { + createWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }, + Error, + CreateWebauthnCredentialsModuleInput['webauthnCredentialsModule'] + >, + 'mutationFn' + > +): UseMutationResult< + { + createWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }, + Error, + CreateWebauthnCredentialsModuleInput['webauthnCredentialsModule'] +>; +export function useCreateWebauthnCredentialsModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + CreateWebauthnCredentialsModuleInput['webauthnCredentialsModule'] + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: webauthnCredentialsModuleMutationKeys.create(), + mutationFn: (data: CreateWebauthnCredentialsModuleInput['webauthnCredentialsModule']) => + getClient() + .webauthnCredentialsModule.create({ + data, + select: args.select, + }) + .unwrap(), + onSuccess: () => { + queryClient.invalidateQueries({ + queryKey: webauthnCredentialsModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useDeleteTableTemplateModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useDeleteDevicesModuleMutation.ts similarity index 51% rename from sdk/constructive-react/src/public/hooks/mutations/useDeleteTableTemplateModuleMutation.ts rename to sdk/constructive-react/src/public/hooks/mutations/useDeleteDevicesModuleMutation.ts index d80fc2f60..873b82119 100644 --- a/sdk/constructive-react/src/public/hooks/mutations/useDeleteTableTemplateModuleMutation.ts +++ b/sdk/constructive-react/src/public/hooks/mutations/useDeleteDevicesModuleMutation.ts @@ -1,5 +1,5 @@ /** - * Delete mutation hook for TableTemplateModule + * Delete mutation hook for DevicesModule * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,39 +9,33 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { tableTemplateModuleKeys } from '../query-keys'; -import { tableTemplateModuleMutationKeys } from '../mutation-keys'; -import type { - TableTemplateModuleSelect, - TableTemplateModuleWithRelations, -} from '../../orm/input-types'; +import { devicesModuleKeys } from '../query-keys'; +import { devicesModuleMutationKeys } from '../mutation-keys'; +import type { DevicesModuleSelect, DevicesModuleWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - TableTemplateModuleSelect, - TableTemplateModuleWithRelations, -} from '../../orm/input-types'; +export type { DevicesModuleSelect, DevicesModuleWithRelations } from '../../orm/input-types'; /** - * Mutation hook for deleting a TableTemplateModule with typed selection + * Mutation hook for deleting a DevicesModule with typed selection * * @example * ```tsx - * const { mutate, isPending } = useDeleteTableTemplateModuleMutation({ + * const { mutate, isPending } = useDeleteDevicesModuleMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteTableTemplateModuleMutation( +export function useDeleteDevicesModuleMutation( params: { selection: { - fields: S & TableTemplateModuleSelect; - } & HookStrictSelect, TableTemplateModuleSelect>; + fields: S & DevicesModuleSelect; + } & HookStrictSelect, DevicesModuleSelect>; } & Omit< UseMutationOptions< { - deleteTableTemplateModule: { - tableTemplateModule: InferSelectResult; + deleteDevicesModule: { + devicesModule: InferSelectResult; }; }, Error, @@ -53,8 +47,8 @@ export function useDeleteTableTemplateModuleMutation ): UseMutationResult< { - deleteTableTemplateModule: { - tableTemplateModule: InferSelectResult; + deleteDevicesModule: { + devicesModule: InferSelectResult; }; }, Error, @@ -62,9 +56,9 @@ export function useDeleteTableTemplateModuleMutation; -export function useDeleteTableTemplateModuleMutation( +export function useDeleteDevicesModuleMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -76,15 +70,15 @@ export function useDeleteTableTemplateModuleMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: tableTemplateModuleMutationKeys.all, + mutationKey: devicesModuleMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .tableTemplateModule.delete({ + .devicesModule.delete({ where: { id, }, @@ -93,10 +87,10 @@ export function useDeleteTableTemplateModuleMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: tableTemplateModuleKeys.detail(variables.id), + queryKey: devicesModuleKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: tableTemplateModuleKeys.lists(), + queryKey: devicesModuleKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/public/hooks/mutations/useDeleteEntityTypeProvisionMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useDeleteEntityTypeProvisionMutation.ts new file mode 100644 index 000000000..0029e7138 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useDeleteEntityTypeProvisionMutation.ts @@ -0,0 +1,118 @@ +/** + * 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. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { entityTypeProvisionKeys } from '../query-keys'; +import { entityTypeProvisionMutationKeys } from '../mutation-keys'; +import type { + EntityTypeProvisionSelect, + EntityTypeProvisionWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EntityTypeProvisionSelect, + EntityTypeProvisionWithRelations, +} from '../../orm/input-types'; +/** + * 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. + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteEntityTypeProvisionMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteEntityTypeProvisionMutation( + params: { + selection: { + fields: S & EntityTypeProvisionSelect; + } & HookStrictSelect, EntityTypeProvisionSelect>; + } & Omit< + UseMutationOptions< + { + deleteEntityTypeProvision: { + entityTypeProvision: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteEntityTypeProvision: { + entityTypeProvision: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteEntityTypeProvisionMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: entityTypeProvisionMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .entityTypeProvision.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: entityTypeProvisionKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: entityTypeProvisionKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/auth/hooks/mutations/useDeleteConnectedAccountMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useDeleteOrgMemberProfileMutation.ts similarity index 55% rename from sdk/constructive-react/src/auth/hooks/mutations/useDeleteConnectedAccountMutation.ts rename to sdk/constructive-react/src/public/hooks/mutations/useDeleteOrgMemberProfileMutation.ts index baf933521..ce00294d4 100644 --- a/sdk/constructive-react/src/auth/hooks/mutations/useDeleteConnectedAccountMutation.ts +++ b/sdk/constructive-react/src/public/hooks/mutations/useDeleteOrgMemberProfileMutation.ts @@ -1,5 +1,5 @@ /** - * OAuth and social login connections linking external service accounts to users + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -9,33 +9,33 @@ import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-quer import { getClient } from '../client'; import { buildSelectionArgs } from '../selection'; import type { SelectionConfig } from '../selection'; -import { connectedAccountKeys } from '../query-keys'; -import { connectedAccountMutationKeys } from '../mutation-keys'; -import type { ConnectedAccountSelect, ConnectedAccountWithRelations } from '../../orm/input-types'; +import { orgMemberProfileKeys } from '../query-keys'; +import { orgMemberProfileMutationKeys } from '../mutation-keys'; +import type { OrgMemberProfileSelect, OrgMemberProfileWithRelations } from '../../orm/input-types'; import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ConnectedAccountSelect, ConnectedAccountWithRelations } from '../../orm/input-types'; +export type { OrgMemberProfileSelect, OrgMemberProfileWithRelations } from '../../orm/input-types'; /** - * OAuth and social login connections linking external service accounts to users + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) * * @example * ```tsx - * const { mutate, isPending } = useDeleteConnectedAccountMutation({ + * const { mutate, isPending } = useDeleteOrgMemberProfileMutation({ * selection: { fields: { id: true } }, * }); * * mutate({ id: 'value-to-delete' }); * ``` */ -export function useDeleteConnectedAccountMutation( +export function useDeleteOrgMemberProfileMutation( params: { selection: { - fields: S & ConnectedAccountSelect; - } & HookStrictSelect, ConnectedAccountSelect>; + fields: S & OrgMemberProfileSelect; + } & HookStrictSelect, OrgMemberProfileSelect>; } & Omit< UseMutationOptions< { - deleteConnectedAccount: { - connectedAccount: InferSelectResult; + deleteOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }, Error, @@ -47,8 +47,8 @@ export function useDeleteConnectedAccountMutation ): UseMutationResult< { - deleteConnectedAccount: { - connectedAccount: InferSelectResult; + deleteOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }, Error, @@ -56,9 +56,9 @@ export function useDeleteConnectedAccountMutation; -export function useDeleteConnectedAccountMutation( +export function useDeleteOrgMemberProfileMutation( params: { - selection: SelectionConfig; + selection: SelectionConfig; } & Omit< UseMutationOptions< any, @@ -70,15 +70,15 @@ export function useDeleteConnectedAccountMutation( 'mutationFn' > ) { - const args = buildSelectionArgs(params.selection); + const args = buildSelectionArgs(params.selection); const { selection: _selection, ...mutationOptions } = params ?? {}; void _selection; const queryClient = useQueryClient(); return useMutation({ - mutationKey: connectedAccountMutationKeys.all, + mutationKey: orgMemberProfileMutationKeys.all, mutationFn: ({ id }: { id: string }) => getClient() - .connectedAccount.delete({ + .orgMemberProfile.delete({ where: { id, }, @@ -87,10 +87,10 @@ export function useDeleteConnectedAccountMutation( .unwrap(), onSuccess: (_, variables) => { queryClient.removeQueries({ - queryKey: connectedAccountKeys.detail(variables.id), + queryKey: orgMemberProfileKeys.detail(variables.id), }); queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.lists(), + queryKey: orgMemberProfileKeys.lists(), }); }, ...mutationOptions, diff --git a/sdk/constructive-react/src/public/hooks/mutations/useDeleteSessionSecretsModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useDeleteSessionSecretsModuleMutation.ts new file mode 100644 index 000000000..e1595239d --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useDeleteSessionSecretsModuleMutation.ts @@ -0,0 +1,104 @@ +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { sessionSecretsModuleKeys } from '../query-keys'; +import { sessionSecretsModuleMutationKeys } from '../mutation-keys'; +import type { + SessionSecretsModuleSelect, + SessionSecretsModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + SessionSecretsModuleSelect, + SessionSecretsModuleWithRelations, +} from '../../orm/input-types'; +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteSessionSecretsModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteSessionSecretsModuleMutation( + params: { + selection: { + fields: S & SessionSecretsModuleSelect; + } & HookStrictSelect, SessionSecretsModuleSelect>; + } & Omit< + UseMutationOptions< + { + deleteSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteSessionSecretsModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: sessionSecretsModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .sessionSecretsModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: sessionSecretsModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: sessionSecretsModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useDeleteSpatialRelationMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useDeleteSpatialRelationMutation.ts new file mode 100644 index 000000000..345a16fc5 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useDeleteSpatialRelationMutation.ts @@ -0,0 +1,98 @@ +/** + * Delete mutation hook for SpatialRelation + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { spatialRelationKeys } from '../query-keys'; +import { spatialRelationMutationKeys } from '../mutation-keys'; +import type { SpatialRelationSelect, SpatialRelationWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { SpatialRelationSelect, SpatialRelationWithRelations } from '../../orm/input-types'; +/** + * Mutation hook for deleting a SpatialRelation with typed selection + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteSpatialRelationMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteSpatialRelationMutation( + params: { + selection: { + fields: S & SpatialRelationSelect; + } & HookStrictSelect, SpatialRelationSelect>; + } & Omit< + UseMutationOptions< + { + deleteSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteSpatialRelationMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: spatialRelationMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .spatialRelation.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: spatialRelationKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: spatialRelationKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useDeleteWebauthnCredentialsModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useDeleteWebauthnCredentialsModuleMutation.ts new file mode 100644 index 000000000..d88e6f256 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useDeleteWebauthnCredentialsModuleMutation.ts @@ -0,0 +1,106 @@ +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { webauthnCredentialsModuleKeys } from '../query-keys'; +import { webauthnCredentialsModuleMutationKeys } from '../mutation-keys'; +import type { + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleWithRelations, +} from '../../orm/input-types'; +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * + * @example + * ```tsx + * const { mutate, isPending } = useDeleteWebauthnCredentialsModuleMutation({ + * selection: { fields: { id: true } }, + * }); + * + * mutate({ id: 'value-to-delete' }); + * ``` + */ +export function useDeleteWebauthnCredentialsModuleMutation< + S extends WebauthnCredentialsModuleSelect, +>( + params: { + selection: { + fields: S & WebauthnCredentialsModuleSelect; + } & HookStrictSelect, WebauthnCredentialsModuleSelect>; + } & Omit< + UseMutationOptions< + { + deleteWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + deleteWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + } +>; +export function useDeleteWebauthnCredentialsModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: webauthnCredentialsModuleMutationKeys.all, + mutationFn: ({ id }: { id: string }) => + getClient() + .webauthnCredentialsModule.delete({ + where: { + id, + }, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.removeQueries({ + queryKey: webauthnCredentialsModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: webauthnCredentialsModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useDisconnectAccountMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useDisconnectAccountMutation.ts new file mode 100644 index 000000000..8efb93805 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useDisconnectAccountMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for disconnectAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { DisconnectAccountVariables } from '../../orm/mutation'; +import type { + DisconnectAccountPayloadSelect, + DisconnectAccountPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { DisconnectAccountVariables } from '../../orm/mutation'; +export type { DisconnectAccountPayloadSelect } from '../../orm/input-types'; +export function useDisconnectAccountMutation( + params: { + selection: { + fields: S & DisconnectAccountPayloadSelect; + } & HookStrictSelect, DisconnectAccountPayloadSelect>; + } & Omit< + UseMutationOptions< + { + disconnectAccount: InferSelectResult | null; + }, + Error, + DisconnectAccountVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + disconnectAccount: InferSelectResult | null; + }, + Error, + DisconnectAccountVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.disconnectAccount(), + mutationFn: (variables: DisconnectAccountVariables) => + getClient() + .mutation.disconnectAccount(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useProvisionNewUserMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useProvisionNewUserMutation.ts new file mode 100644 index 000000000..24964f5a6 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useProvisionNewUserMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for provisionNewUser + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { ProvisionNewUserVariables } from '../../orm/mutation'; +import type { ProvisionNewUserPayloadSelect, ProvisionNewUserPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { ProvisionNewUserVariables } from '../../orm/mutation'; +export type { ProvisionNewUserPayloadSelect } from '../../orm/input-types'; +export function useProvisionNewUserMutation( + params: { + selection: { + fields: S & ProvisionNewUserPayloadSelect; + } & HookStrictSelect, ProvisionNewUserPayloadSelect>; + } & Omit< + UseMutationOptions< + { + provisionNewUser: InferSelectResult | null; + }, + Error, + ProvisionNewUserVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + provisionNewUser: InferSelectResult | null; + }, + Error, + ProvisionNewUserVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.provisionNewUser(), + mutationFn: (variables: ProvisionNewUserVariables) => + getClient() + .mutation.provisionNewUser(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useProvisionSpatialRelationMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useProvisionSpatialRelationMutation.ts new file mode 100644 index 000000000..5d09d35fd --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useProvisionSpatialRelationMutation.ts @@ -0,0 +1,60 @@ +/** + * Custom mutation hook for provisionSpatialRelation + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { ProvisionSpatialRelationVariables } from '../../orm/mutation'; +import type { + ProvisionSpatialRelationPayloadSelect, + ProvisionSpatialRelationPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { ProvisionSpatialRelationVariables } from '../../orm/mutation'; +export type { ProvisionSpatialRelationPayloadSelect } from '../../orm/input-types'; +export function useProvisionSpatialRelationMutation< + S extends ProvisionSpatialRelationPayloadSelect, +>( + params: { + selection: { + fields: S & ProvisionSpatialRelationPayloadSelect; + } & HookStrictSelect, ProvisionSpatialRelationPayloadSelect>; + } & Omit< + UseMutationOptions< + { + provisionSpatialRelation: InferSelectResult | null; + }, + Error, + ProvisionSpatialRelationVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + provisionSpatialRelation: InferSelectResult | null; + }, + Error, + ProvisionSpatialRelationVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.provisionSpatialRelation(), + mutationFn: (variables: ProvisionSpatialRelationVariables) => + getClient() + .mutation.provisionSpatialRelation(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useRequestCrossOriginTokenMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useRequestCrossOriginTokenMutation.ts new file mode 100644 index 000000000..e8575a3fa --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useRequestCrossOriginTokenMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for requestCrossOriginToken + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { RequestCrossOriginTokenVariables } from '../../orm/mutation'; +import type { + RequestCrossOriginTokenPayloadSelect, + RequestCrossOriginTokenPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { RequestCrossOriginTokenVariables } from '../../orm/mutation'; +export type { RequestCrossOriginTokenPayloadSelect } from '../../orm/input-types'; +export function useRequestCrossOriginTokenMutation( + params: { + selection: { + fields: S & RequestCrossOriginTokenPayloadSelect; + } & HookStrictSelect, RequestCrossOriginTokenPayloadSelect>; + } & Omit< + UseMutationOptions< + { + requestCrossOriginToken: InferSelectResult | null; + }, + Error, + RequestCrossOriginTokenVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + requestCrossOriginToken: InferSelectResult | null; + }, + Error, + RequestCrossOriginTokenVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.requestCrossOriginToken(), + mutationFn: (variables: RequestCrossOriginTokenVariables) => + getClient() + .mutation.requestCrossOriginToken(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useRevokeApiKeyMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useRevokeApiKeyMutation.ts new file mode 100644 index 000000000..68641999a --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useRevokeApiKeyMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for revokeApiKey + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { RevokeApiKeyVariables } from '../../orm/mutation'; +import type { RevokeApiKeyPayloadSelect, RevokeApiKeyPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { RevokeApiKeyVariables } from '../../orm/mutation'; +export type { RevokeApiKeyPayloadSelect } from '../../orm/input-types'; +export function useRevokeApiKeyMutation( + params: { + selection: { + fields: S & RevokeApiKeyPayloadSelect; + } & HookStrictSelect, RevokeApiKeyPayloadSelect>; + } & Omit< + UseMutationOptions< + { + revokeApiKey: InferSelectResult | null; + }, + Error, + RevokeApiKeyVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + revokeApiKey: InferSelectResult | null; + }, + Error, + RevokeApiKeyVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.revokeApiKey(), + mutationFn: (variables: RevokeApiKeyVariables) => + getClient() + .mutation.revokeApiKey(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useRevokeSessionMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useRevokeSessionMutation.ts new file mode 100644 index 000000000..773e73c5f --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useRevokeSessionMutation.ts @@ -0,0 +1,55 @@ +/** + * Custom mutation hook for revokeSession + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { RevokeSessionVariables } from '../../orm/mutation'; +import type { RevokeSessionPayloadSelect, RevokeSessionPayload } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { RevokeSessionVariables } from '../../orm/mutation'; +export type { RevokeSessionPayloadSelect } from '../../orm/input-types'; +export function useRevokeSessionMutation( + params: { + selection: { + fields: S & RevokeSessionPayloadSelect; + } & HookStrictSelect, RevokeSessionPayloadSelect>; + } & Omit< + UseMutationOptions< + { + revokeSession: InferSelectResult | null; + }, + Error, + RevokeSessionVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + revokeSession: InferSelectResult | null; + }, + Error, + RevokeSessionVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.revokeSession(), + mutationFn: (variables: RevokeSessionVariables) => + getClient() + .mutation.revokeSession(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useSignInCrossOriginMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useSignInCrossOriginMutation.ts new file mode 100644 index 000000000..8afc11454 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useSignInCrossOriginMutation.ts @@ -0,0 +1,58 @@ +/** + * Custom mutation hook for signInCrossOrigin + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customMutationKeys } from '../mutation-keys'; +import type { SignInCrossOriginVariables } from '../../orm/mutation'; +import type { + SignInCrossOriginPayloadSelect, + SignInCrossOriginPayload, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect, StrictSelect } from '../../orm/select-types'; +export type { SignInCrossOriginVariables } from '../../orm/mutation'; +export type { SignInCrossOriginPayloadSelect } from '../../orm/input-types'; +export function useSignInCrossOriginMutation( + params: { + selection: { + fields: S & SignInCrossOriginPayloadSelect; + } & HookStrictSelect, SignInCrossOriginPayloadSelect>; + } & Omit< + UseMutationOptions< + { + signInCrossOrigin: InferSelectResult | null; + }, + Error, + SignInCrossOriginVariables + >, + 'mutationFn' + > +): UseMutationResult< + { + signInCrossOrigin: InferSelectResult | null; + }, + Error, + SignInCrossOriginVariables +> { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + return useMutation({ + mutationKey: customMutationKeys.signInCrossOrigin(), + mutationFn: (variables: SignInCrossOriginVariables) => + getClient() + .mutation.signInCrossOrigin(variables, { + select: args.select, + } as { + select: S; + } & StrictSelect) + .unwrap(), + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useUpdateConnectedAccountMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useUpdateConnectedAccountMutation.ts deleted file mode 100644 index 3615b7022..000000000 --- a/sdk/constructive-react/src/public/hooks/mutations/useUpdateConnectedAccountMutation.ts +++ /dev/null @@ -1,116 +0,0 @@ -/** - * OAuth and social login connections linking external service accounts to users - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { connectedAccountKeys } from '../query-keys'; -import { connectedAccountMutationKeys } from '../mutation-keys'; -import type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - ConnectedAccountPatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - ConnectedAccountPatch, -} from '../../orm/input-types'; -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdateConnectedAccountMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', connectedAccountPatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdateConnectedAccountMutation( - params: { - selection: { - fields: S & ConnectedAccountSelect; - } & HookStrictSelect, ConnectedAccountSelect>; - } & Omit< - UseMutationOptions< - { - updateConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }, - Error, - { - id: string; - connectedAccountPatch: ConnectedAccountPatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updateConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }, - Error, - { - id: string; - connectedAccountPatch: ConnectedAccountPatch; - } ->; -export function useUpdateConnectedAccountMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - connectedAccountPatch: ConnectedAccountPatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: connectedAccountMutationKeys.all, - mutationFn: ({ - id, - connectedAccountPatch, - }: { - id: string; - connectedAccountPatch: ConnectedAccountPatch; - }) => - getClient() - .connectedAccount.update({ - where: { - id, - }, - data: connectedAccountPatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: connectedAccountKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useUpdateDevicesModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useUpdateDevicesModuleMutation.ts new file mode 100644 index 000000000..adf244360 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useUpdateDevicesModuleMutation.ts @@ -0,0 +1,116 @@ +/** + * Update mutation hook for DevicesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { devicesModuleKeys } from '../query-keys'; +import { devicesModuleMutationKeys } from '../mutation-keys'; +import type { + DevicesModuleSelect, + DevicesModuleWithRelations, + DevicesModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + DevicesModuleSelect, + DevicesModuleWithRelations, + DevicesModulePatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a DevicesModule + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateDevicesModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', devicesModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateDevicesModuleMutation( + params: { + selection: { + fields: S & DevicesModuleSelect; + } & HookStrictSelect, DevicesModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateDevicesModule: { + devicesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + devicesModulePatch: DevicesModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateDevicesModule: { + devicesModule: InferSelectResult; + }; + }, + Error, + { + id: string; + devicesModulePatch: DevicesModulePatch; + } +>; +export function useUpdateDevicesModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + devicesModulePatch: DevicesModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: devicesModuleMutationKeys.all, + mutationFn: ({ + id, + devicesModulePatch, + }: { + id: string; + devicesModulePatch: DevicesModulePatch; + }) => + getClient() + .devicesModule.update({ + where: { + id, + }, + data: devicesModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: devicesModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: devicesModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useUpdateEntityTypeProvisionMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useUpdateEntityTypeProvisionMutation.ts new file mode 100644 index 000000000..a95af50c3 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useUpdateEntityTypeProvisionMutation.ts @@ -0,0 +1,130 @@ +/** + * 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. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { entityTypeProvisionKeys } from '../query-keys'; +import { entityTypeProvisionMutationKeys } from '../mutation-keys'; +import type { + EntityTypeProvisionSelect, + EntityTypeProvisionWithRelations, + EntityTypeProvisionPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EntityTypeProvisionSelect, + EntityTypeProvisionWithRelations, + EntityTypeProvisionPatch, +} from '../../orm/input-types'; +/** + * 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. + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateEntityTypeProvisionMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', entityTypeProvisionPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateEntityTypeProvisionMutation( + params: { + selection: { + fields: S & EntityTypeProvisionSelect; + } & HookStrictSelect, EntityTypeProvisionSelect>; + } & Omit< + UseMutationOptions< + { + updateEntityTypeProvision: { + entityTypeProvision: InferSelectResult; + }; + }, + Error, + { + id: string; + entityTypeProvisionPatch: EntityTypeProvisionPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateEntityTypeProvision: { + entityTypeProvision: InferSelectResult; + }; + }, + Error, + { + id: string; + entityTypeProvisionPatch: EntityTypeProvisionPatch; + } +>; +export function useUpdateEntityTypeProvisionMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + entityTypeProvisionPatch: EntityTypeProvisionPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: entityTypeProvisionMutationKeys.all, + mutationFn: ({ + id, + entityTypeProvisionPatch, + }: { + id: string; + entityTypeProvisionPatch: EntityTypeProvisionPatch; + }) => + getClient() + .entityTypeProvision.update({ + where: { + id, + }, + data: entityTypeProvisionPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: entityTypeProvisionKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: entityTypeProvisionKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useUpdateOrgMemberProfileMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useUpdateOrgMemberProfileMutation.ts new file mode 100644 index 000000000..2dcb8b95c --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useUpdateOrgMemberProfileMutation.ts @@ -0,0 +1,116 @@ +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { orgMemberProfileKeys } from '../query-keys'; +import { orgMemberProfileMutationKeys } from '../mutation-keys'; +import type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + OrgMemberProfilePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + OrgMemberProfilePatch, +} from '../../orm/input-types'; +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateOrgMemberProfileMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', orgMemberProfilePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateOrgMemberProfileMutation( + params: { + selection: { + fields: S & OrgMemberProfileSelect; + } & HookStrictSelect, OrgMemberProfileSelect>; + } & Omit< + UseMutationOptions< + { + updateOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }, + Error, + { + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; + } +>; +export function useUpdateOrgMemberProfileMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: orgMemberProfileMutationKeys.all, + mutationFn: ({ + id, + orgMemberProfilePatch, + }: { + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; + }) => + getClient() + .orgMemberProfile.update({ + where: { + id, + }, + data: orgMemberProfilePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: orgMemberProfileKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useUpdateSessionSecretsModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useUpdateSessionSecretsModuleMutation.ts new file mode 100644 index 000000000..e2ca0ad67 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useUpdateSessionSecretsModuleMutation.ts @@ -0,0 +1,116 @@ +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { sessionSecretsModuleKeys } from '../query-keys'; +import { sessionSecretsModuleMutationKeys } from '../mutation-keys'; +import type { + SessionSecretsModuleSelect, + SessionSecretsModuleWithRelations, + SessionSecretsModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + SessionSecretsModuleSelect, + SessionSecretsModuleWithRelations, + SessionSecretsModulePatch, +} from '../../orm/input-types'; +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateSessionSecretsModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', sessionSecretsModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateSessionSecretsModuleMutation( + params: { + selection: { + fields: S & SessionSecretsModuleSelect; + } & HookStrictSelect, SessionSecretsModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + sessionSecretsModulePatch: SessionSecretsModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + sessionSecretsModulePatch: SessionSecretsModulePatch; + } +>; +export function useUpdateSessionSecretsModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + sessionSecretsModulePatch: SessionSecretsModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: sessionSecretsModuleMutationKeys.all, + mutationFn: ({ + id, + sessionSecretsModulePatch, + }: { + id: string; + sessionSecretsModulePatch: SessionSecretsModulePatch; + }) => + getClient() + .sessionSecretsModule.update({ + where: { + id, + }, + data: sessionSecretsModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: sessionSecretsModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: sessionSecretsModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useUpdateSpatialRelationMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useUpdateSpatialRelationMutation.ts new file mode 100644 index 000000000..a1ed7a878 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useUpdateSpatialRelationMutation.ts @@ -0,0 +1,116 @@ +/** + * Update mutation hook for SpatialRelation + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { spatialRelationKeys } from '../query-keys'; +import { spatialRelationMutationKeys } from '../mutation-keys'; +import type { + SpatialRelationSelect, + SpatialRelationWithRelations, + SpatialRelationPatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + SpatialRelationSelect, + SpatialRelationWithRelations, + SpatialRelationPatch, +} from '../../orm/input-types'; +/** + * Mutation hook for updating a SpatialRelation + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateSpatialRelationMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', spatialRelationPatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateSpatialRelationMutation( + params: { + selection: { + fields: S & SpatialRelationSelect; + } & HookStrictSelect, SpatialRelationSelect>; + } & Omit< + UseMutationOptions< + { + updateSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }, + Error, + { + id: string; + spatialRelationPatch: SpatialRelationPatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }, + Error, + { + id: string; + spatialRelationPatch: SpatialRelationPatch; + } +>; +export function useUpdateSpatialRelationMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + spatialRelationPatch: SpatialRelationPatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: spatialRelationMutationKeys.all, + mutationFn: ({ + id, + spatialRelationPatch, + }: { + id: string; + spatialRelationPatch: SpatialRelationPatch; + }) => + getClient() + .spatialRelation.update({ + where: { + id, + }, + data: spatialRelationPatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: spatialRelationKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: spatialRelationKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useUpdateTableTemplateModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useUpdateTableTemplateModuleMutation.ts deleted file mode 100644 index 8d4b9f9b6..000000000 --- a/sdk/constructive-react/src/public/hooks/mutations/useUpdateTableTemplateModuleMutation.ts +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Update mutation hook for TableTemplateModule - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { tableTemplateModuleKeys } from '../query-keys'; -import { tableTemplateModuleMutationKeys } from '../mutation-keys'; -import type { - TableTemplateModuleSelect, - TableTemplateModuleWithRelations, - TableTemplateModulePatch, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - TableTemplateModuleSelect, - TableTemplateModuleWithRelations, - TableTemplateModulePatch, -} from '../../orm/input-types'; -/** - * Mutation hook for updating a TableTemplateModule - * - * @example - * ```tsx - * const { mutate, isPending } = useUpdateTableTemplateModuleMutation({ - * selection: { fields: { id: true, name: true } }, - * }); - * - * mutate({ id: 'value-here', tableTemplateModulePatch: { name: 'Updated' } }); - * ``` - */ -export function useUpdateTableTemplateModuleMutation( - params: { - selection: { - fields: S & TableTemplateModuleSelect; - } & HookStrictSelect, TableTemplateModuleSelect>; - } & Omit< - UseMutationOptions< - { - updateTableTemplateModule: { - tableTemplateModule: InferSelectResult; - }; - }, - Error, - { - id: string; - tableTemplateModulePatch: TableTemplateModulePatch; - } - >, - 'mutationFn' - > -): UseMutationResult< - { - updateTableTemplateModule: { - tableTemplateModule: InferSelectResult; - }; - }, - Error, - { - id: string; - tableTemplateModulePatch: TableTemplateModulePatch; - } ->; -export function useUpdateTableTemplateModuleMutation( - params: { - selection: SelectionConfig; - } & Omit< - UseMutationOptions< - any, - Error, - { - id: string; - tableTemplateModulePatch: TableTemplateModulePatch; - } - >, - 'mutationFn' - > -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...mutationOptions } = params ?? {}; - void _selection; - const queryClient = useQueryClient(); - return useMutation({ - mutationKey: tableTemplateModuleMutationKeys.all, - mutationFn: ({ - id, - tableTemplateModulePatch, - }: { - id: string; - tableTemplateModulePatch: TableTemplateModulePatch; - }) => - getClient() - .tableTemplateModule.update({ - where: { - id, - }, - data: tableTemplateModulePatch, - select: args.select, - }) - .unwrap(), - onSuccess: (_, variables) => { - queryClient.invalidateQueries({ - queryKey: tableTemplateModuleKeys.detail(variables.id), - }); - queryClient.invalidateQueries({ - queryKey: tableTemplateModuleKeys.lists(), - }); - }, - ...mutationOptions, - }); -} diff --git a/sdk/constructive-react/src/public/hooks/mutations/useUpdateWebauthnCredentialsModuleMutation.ts b/sdk/constructive-react/src/public/hooks/mutations/useUpdateWebauthnCredentialsModuleMutation.ts new file mode 100644 index 000000000..42c1eb761 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/mutations/useUpdateWebauthnCredentialsModuleMutation.ts @@ -0,0 +1,118 @@ +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import type { UseMutationOptions, UseMutationResult } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { webauthnCredentialsModuleKeys } from '../query-keys'; +import { webauthnCredentialsModuleMutationKeys } from '../mutation-keys'; +import type { + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleWithRelations, + WebauthnCredentialsModulePatch, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleWithRelations, + WebauthnCredentialsModulePatch, +} from '../../orm/input-types'; +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * + * @example + * ```tsx + * const { mutate, isPending } = useUpdateWebauthnCredentialsModuleMutation({ + * selection: { fields: { id: true, name: true } }, + * }); + * + * mutate({ id: 'value-here', webauthnCredentialsModulePatch: { name: 'Updated' } }); + * ``` + */ +export function useUpdateWebauthnCredentialsModuleMutation< + S extends WebauthnCredentialsModuleSelect, +>( + params: { + selection: { + fields: S & WebauthnCredentialsModuleSelect; + } & HookStrictSelect, WebauthnCredentialsModuleSelect>; + } & Omit< + UseMutationOptions< + { + updateWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + webauthnCredentialsModulePatch: WebauthnCredentialsModulePatch; + } + >, + 'mutationFn' + > +): UseMutationResult< + { + updateWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }, + Error, + { + id: string; + webauthnCredentialsModulePatch: WebauthnCredentialsModulePatch; + } +>; +export function useUpdateWebauthnCredentialsModuleMutation( + params: { + selection: SelectionConfig; + } & Omit< + UseMutationOptions< + any, + Error, + { + id: string; + webauthnCredentialsModulePatch: WebauthnCredentialsModulePatch; + } + >, + 'mutationFn' + > +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...mutationOptions } = params ?? {}; + void _selection; + const queryClient = useQueryClient(); + return useMutation({ + mutationKey: webauthnCredentialsModuleMutationKeys.all, + mutationFn: ({ + id, + webauthnCredentialsModulePatch, + }: { + id: string; + webauthnCredentialsModulePatch: WebauthnCredentialsModulePatch; + }) => + getClient() + .webauthnCredentialsModule.update({ + where: { + id, + }, + data: webauthnCredentialsModulePatch, + select: args.select, + }) + .unwrap(), + onSuccess: (_, variables) => { + queryClient.invalidateQueries({ + queryKey: webauthnCredentialsModuleKeys.detail(variables.id), + }); + queryClient.invalidateQueries({ + queryKey: webauthnCredentialsModuleKeys.lists(), + }); + }, + ...mutationOptions, + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/index.ts b/sdk/constructive-react/src/public/hooks/queries/index.ts index 3804f4a0b..4142f9cd0 100644 --- a/sdk/constructive-react/src/public/hooks/queries/index.ts +++ b/sdk/constructive-react/src/public/hooks/queries/index.ts @@ -24,6 +24,8 @@ export * from './useCheckConstraintsQuery'; export * from './useCheckConstraintQuery'; export * from './useFieldsQuery'; export * from './useFieldQuery'; +export * from './useSpatialRelationsQuery'; +export * from './useSpatialRelationQuery'; export * from './useForeignKeyConstraintsQuery'; export * from './useForeignKeyConstraintQuery'; export * from './useFullTextSearchesQuery'; @@ -50,12 +52,12 @@ export * from './useViewRulesQuery'; export * from './useViewRuleQuery'; export * from './useEmbeddingChunksQuery'; export * from './useEmbeddingChunkQuery'; -export * from './useTableTemplateModulesQuery'; -export * from './useTableTemplateModuleQuery'; export * from './useSecureTableProvisionsQuery'; export * from './useSecureTableProvisionQuery'; export * from './useRelationProvisionsQuery'; export * from './useRelationProvisionQuery'; +export * from './useSessionSecretsModulesQuery'; +export * from './useSessionSecretsModuleQuery'; export * from './useSchemaGrantsQuery'; export * from './useSchemaGrantQuery'; export * from './useDefaultPrivilegesQuery'; @@ -130,6 +132,10 @@ export * from './useBlueprintConstructionsQuery'; export * from './useBlueprintConstructionQuery'; export * from './useStorageModulesQuery'; export * from './useStorageModuleQuery'; +export * from './useEntityTypeProvisionsQuery'; +export * from './useEntityTypeProvisionQuery'; +export * from './useWebauthnCredentialsModulesQuery'; +export * from './useWebauthnCredentialsModuleQuery'; export * from './useDatabaseProvisionModulesQuery'; export * from './useDatabaseProvisionModuleQuery'; export * from './useAppAdminGrantsQuery'; @@ -146,6 +152,8 @@ export * from './useOrgAdminGrantsQuery'; export * from './useOrgAdminGrantQuery'; export * from './useOrgOwnerGrantsQuery'; export * from './useOrgOwnerGrantQuery'; +export * from './useOrgMemberProfilesQuery'; +export * from './useOrgMemberProfileQuery'; export * from './useOrgGrantsQuery'; export * from './useOrgGrantQuery'; export * from './useOrgChartEdgesQuery'; @@ -170,8 +178,6 @@ export * from './usePhoneNumbersQuery'; export * from './usePhoneNumberQuery'; export * from './useCryptoAddressesQuery'; export * from './useCryptoAddressQuery'; -export * from './useConnectedAccountsQuery'; -export * from './useConnectedAccountQuery'; export * from './useAppInvitesQuery'; export * from './useAppInviteQuery'; export * from './useAppClaimedInvitesQuery'; @@ -196,14 +202,18 @@ export * from './useAppLimitDefaultsQuery'; export * from './useAppLimitDefaultQuery'; export * from './useOrgLimitDefaultsQuery'; export * from './useOrgLimitDefaultQuery'; -export * from './useMembershipTypesQuery'; -export * from './useMembershipTypeQuery'; +export * from './useDevicesModulesQuery'; +export * from './useDevicesModuleQuery'; +export * from './useUserConnectedAccountsQuery'; +export * from './useUserConnectedAccountQuery'; export * from './useAppMembershipDefaultsQuery'; export * from './useAppMembershipDefaultQuery'; export * from './useCommitsQuery'; export * from './useCommitQuery'; export * from './useRateLimitsModulesQuery'; export * from './useRateLimitsModuleQuery'; +export * from './useMembershipTypesQuery'; +export * from './useMembershipTypeQuery'; export * from './useOrgMembershipDefaultsQuery'; export * from './useOrgMembershipDefaultQuery'; export * from './useRlsModulesQuery'; @@ -219,12 +229,14 @@ export * from './useAppMembershipQuery'; export * from './useHierarchyModulesQuery'; export * from './useHierarchyModuleQuery'; export * from './useCurrentUserIdQuery'; -export * from './useCurrentIpAddressQuery'; export * from './useCurrentUserAgentQuery'; +export * from './useCurrentIpAddressQuery'; +export * from './useRequireStepUpQuery'; export * from './useAppPermissionsGetPaddedMaskQuery'; export * from './useOrgPermissionsGetPaddedMaskQuery'; export * from './useStepsAchievedQuery'; export * from './useRevParseQuery'; +export * from './useResolveBlueprintFieldQuery'; export * from './useOrgIsManagerOfQuery'; export * from './useAppPermissionsGetMaskQuery'; export * from './useOrgPermissionsGetMaskQuery'; diff --git a/sdk/constructive-react/src/public/hooks/queries/useConnectedAccountQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useConnectedAccountQuery.ts deleted file mode 100644 index 913b660d4..000000000 --- a/sdk/constructive-react/src/public/hooks/queries/useConnectedAccountQuery.ts +++ /dev/null @@ -1,138 +0,0 @@ -/** - * OAuth and social login connections linking external service accounts to users - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useQuery } from '@tanstack/react-query'; -import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { connectedAccountKeys } from '../query-keys'; -import type { ConnectedAccountSelect, ConnectedAccountWithRelations } from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { ConnectedAccountSelect, ConnectedAccountWithRelations } from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const connectedAccountQueryKey = connectedAccountKeys.detail; -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```tsx - * const { data, isLoading } = useConnectedAccountQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useConnectedAccountQuery< - S extends ConnectedAccountSelect, - TData = { - connectedAccount: InferSelectResult | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, ConnectedAccountSelect>; - } & Omit< - UseQueryOptions< - { - connectedAccount: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useConnectedAccountQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: connectedAccountKeys.detail(params.id), - queryFn: () => - getClient() - .connectedAccount.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```ts - * const data = await fetchConnectedAccountQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchConnectedAccountQuery(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, ConnectedAccountSelect>; -}): Promise<{ - connectedAccount: InferSelectResult | null; -}>; -export async function fetchConnectedAccountQuery(params: { - id: string; - selection: SelectionConfig; -}) { - const args = buildSelectionArgs(params.selection); - return getClient() - .connectedAccount.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```ts - * await prefetchConnectedAccountQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchConnectedAccountQuery( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, ConnectedAccountSelect>; - } -): Promise; -export async function prefetchConnectedAccountQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: connectedAccountKeys.detail(params.id), - queryFn: () => - getClient() - .connectedAccount.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/public/hooks/queries/useConnectedAccountsQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useConnectedAccountsQuery.ts deleted file mode 100644 index b75ee2f80..000000000 --- a/sdk/constructive-react/src/public/hooks/queries/useConnectedAccountsQuery.ts +++ /dev/null @@ -1,163 +0,0 @@ -/** - * OAuth and social login connections linking external service accounts to users - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useQuery } from '@tanstack/react-query'; -import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildListSelectionArgs } from '../selection'; -import type { ListSelectionConfig } from '../selection'; -import { connectedAccountKeys } from '../query-keys'; -import type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - ConnectedAccountFilter, - ConnectedAccountOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - ConnectedAccountSelect, - ConnectedAccountWithRelations, - ConnectedAccountFilter, - ConnectedAccountOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const connectedAccountsQueryKey = connectedAccountKeys.list; -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```tsx - * const { data, isLoading } = useConnectedAccountsQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useConnectedAccountsQuery< - S extends ConnectedAccountSelect, - TData = { - connectedAccounts: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ConnectedAccountSelect>; - } & Omit< - UseQueryOptions< - { - connectedAccounts: ConnectionResult>; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useConnectedAccountsQuery( - params: { - selection: ListSelectionConfig< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: connectedAccountKeys.list(args), - queryFn: () => getClient().connectedAccount.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```ts - * const data = await fetchConnectedAccountsQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchConnectedAccountsQuery(params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ConnectedAccountSelect>; -}): Promise<{ - connectedAccounts: ConnectionResult>; -}>; -export async function fetchConnectedAccountsQuery(params: { - selection: ListSelectionConfig< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >; -}) { - const args = buildListSelectionArgs< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >(params.selection); - return getClient().connectedAccount.findMany(args).unwrap(); -} -/** - * OAuth and social login connections linking external service accounts to users - * - * @example - * ```ts - * await prefetchConnectedAccountsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchConnectedAccountsQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit, 'fields'> & - HookStrictSelect, ConnectedAccountSelect>; - } -): Promise; -export async function prefetchConnectedAccountsQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: connectedAccountKeys.list(args), - queryFn: () => getClient().connectedAccount.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/public/hooks/queries/useDevicesModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useDevicesModuleQuery.ts new file mode 100644 index 000000000..a33999871 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useDevicesModuleQuery.ts @@ -0,0 +1,138 @@ +/** + * Single item query hook for DevicesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { devicesModuleKeys } from '../query-keys'; +import type { DevicesModuleSelect, DevicesModuleWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { DevicesModuleSelect, DevicesModuleWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const devicesModuleQueryKey = devicesModuleKeys.detail; +/** + * Query hook for fetching a single DevicesModule + * + * @example + * ```tsx + * const { data, isLoading } = useDevicesModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useDevicesModuleQuery< + S extends DevicesModuleSelect, + TData = { + devicesModule: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, DevicesModuleSelect>; + } & Omit< + UseQueryOptions< + { + devicesModule: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useDevicesModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: devicesModuleKeys.detail(params.id), + queryFn: () => + getClient() + .devicesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single DevicesModule without React hooks + * + * @example + * ```ts + * const data = await fetchDevicesModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchDevicesModuleQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, DevicesModuleSelect>; +}): Promise<{ + devicesModule: InferSelectResult | null; +}>; +export async function fetchDevicesModuleQuery(params: { + id: string; + selection: SelectionConfig; +}) { + const args = buildSelectionArgs(params.selection); + return getClient() + .devicesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single DevicesModule for SSR or cache warming + * + * @example + * ```ts + * await prefetchDevicesModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchDevicesModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, DevicesModuleSelect>; + } +): Promise; +export async function prefetchDevicesModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: devicesModuleKeys.detail(params.id), + queryFn: () => + getClient() + .devicesModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useDevicesModulesQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useDevicesModulesQuery.ts new file mode 100644 index 000000000..91ea254fa --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useDevicesModulesQuery.ts @@ -0,0 +1,151 @@ +/** + * List query hook for DevicesModule + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { devicesModuleKeys } from '../query-keys'; +import type { + DevicesModuleSelect, + DevicesModuleWithRelations, + DevicesModuleFilter, + DevicesModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + DevicesModuleSelect, + DevicesModuleWithRelations, + DevicesModuleFilter, + DevicesModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const devicesModulesQueryKey = devicesModuleKeys.list; +/** + * Query hook for fetching DevicesModule list + * + * @example + * ```tsx + * const { data, isLoading } = useDevicesModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useDevicesModulesQuery< + S extends DevicesModuleSelect, + TData = { + devicesModules: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, DevicesModuleSelect>; + } & Omit< + UseQueryOptions< + { + devicesModules: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useDevicesModulesQuery( + params: { + selection: ListSelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + DevicesModuleSelect, + DevicesModuleFilter, + DevicesModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: devicesModuleKeys.list(args), + queryFn: () => getClient().devicesModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch DevicesModule list without React hooks + * + * @example + * ```ts + * const data = await fetchDevicesModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchDevicesModulesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, DevicesModuleSelect>; +}): Promise<{ + devicesModules: ConnectionResult>; +}>; +export async function fetchDevicesModulesQuery(params: { + selection: ListSelectionConfig; +}) { + const args = buildListSelectionArgs< + DevicesModuleSelect, + DevicesModuleFilter, + DevicesModuleOrderBy + >(params.selection); + return getClient().devicesModule.findMany(args).unwrap(); +} +/** + * Prefetch DevicesModule list for SSR or cache warming + * + * @example + * ```ts + * await prefetchDevicesModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchDevicesModulesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, DevicesModuleSelect>; + } +): Promise; +export async function prefetchDevicesModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig; + } +): Promise { + const args = buildListSelectionArgs< + DevicesModuleSelect, + DevicesModuleFilter, + DevicesModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: devicesModuleKeys.list(args), + queryFn: () => getClient().devicesModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useEntityTypeProvisionQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useEntityTypeProvisionQuery.ts new file mode 100644 index 000000000..8f3eceb28 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useEntityTypeProvisionQuery.ts @@ -0,0 +1,172 @@ +/** + * 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. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { entityTypeProvisionKeys } from '../query-keys'; +import type { + EntityTypeProvisionSelect, + EntityTypeProvisionWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + EntityTypeProvisionSelect, + EntityTypeProvisionWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const entityTypeProvisionQueryKey = entityTypeProvisionKeys.detail; +/** + * 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. + * + * @example + * ```tsx + * const { data, isLoading } = useEntityTypeProvisionQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useEntityTypeProvisionQuery< + S extends EntityTypeProvisionSelect, + TData = { + entityTypeProvision: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EntityTypeProvisionSelect>; + } & Omit< + UseQueryOptions< + { + entityTypeProvision: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEntityTypeProvisionQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: entityTypeProvisionKeys.detail(params.id), + queryFn: () => + getClient() + .entityTypeProvision.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * 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. + * + * @example + * ```ts + * const data = await fetchEntityTypeProvisionQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchEntityTypeProvisionQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EntityTypeProvisionSelect>; +}): Promise<{ + entityTypeProvision: InferSelectResult | null; +}>; +export async function fetchEntityTypeProvisionQuery(params: { + id: string; + selection: SelectionConfig; +}) { + const args = buildSelectionArgs(params.selection); + return getClient() + .entityTypeProvision.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * 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. + * + * @example + * ```ts + * await prefetchEntityTypeProvisionQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchEntityTypeProvisionQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, EntityTypeProvisionSelect>; + } +): Promise; +export async function prefetchEntityTypeProvisionQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: entityTypeProvisionKeys.detail(params.id), + queryFn: () => + getClient() + .entityTypeProvision.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useEntityTypeProvisionsQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useEntityTypeProvisionsQuery.ts new file mode 100644 index 000000000..4c1c2fbba --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useEntityTypeProvisionsQuery.ts @@ -0,0 +1,202 @@ +/** + * 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. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { entityTypeProvisionKeys } from '../query-keys'; +import type { + EntityTypeProvisionSelect, + EntityTypeProvisionWithRelations, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + EntityTypeProvisionSelect, + EntityTypeProvisionWithRelations, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const entityTypeProvisionsQueryKey = entityTypeProvisionKeys.list; +/** + * 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. + * + * @example + * ```tsx + * const { data, isLoading } = useEntityTypeProvisionsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useEntityTypeProvisionsQuery< + S extends EntityTypeProvisionSelect, + TData = { + entityTypeProvisions: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, EntityTypeProvisionSelect>; + } & Omit< + UseQueryOptions< + { + entityTypeProvisions: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useEntityTypeProvisionsQuery( + params: { + selection: ListSelectionConfig< + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: entityTypeProvisionKeys.list(args), + queryFn: () => getClient().entityTypeProvision.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * 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. + * + * @example + * ```ts + * const data = await fetchEntityTypeProvisionsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchEntityTypeProvisionsQuery(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, EntityTypeProvisionSelect>; +}): Promise<{ + entityTypeProvisions: ConnectionResult>; +}>; +export async function fetchEntityTypeProvisionsQuery(params: { + selection: ListSelectionConfig< + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy + >; +}) { + const args = buildListSelectionArgs< + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy + >(params.selection); + return getClient().entityTypeProvision.findMany(args).unwrap(); +} +/** + * 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. + * + * @example + * ```ts + * await prefetchEntityTypeProvisionsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchEntityTypeProvisionsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, EntityTypeProvisionSelect>; + } +): Promise; +export async function prefetchEntityTypeProvisionsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: entityTypeProvisionKeys.list(args), + queryFn: () => getClient().entityTypeProvision.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgMemberProfileQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgMemberProfileQuery.ts new file mode 100644 index 000000000..6ad525e09 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgMemberProfileQuery.ts @@ -0,0 +1,138 @@ +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { orgMemberProfileKeys } from '../query-keys'; +import type { OrgMemberProfileSelect, OrgMemberProfileWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { OrgMemberProfileSelect, OrgMemberProfileWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgMemberProfileQueryKey = orgMemberProfileKeys.detail; +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```tsx + * const { data, isLoading } = useOrgMemberProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useOrgMemberProfileQuery< + S extends OrgMemberProfileSelect, + TData = { + orgMemberProfile: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgMemberProfileSelect>; + } & Omit< + UseQueryOptions< + { + orgMemberProfile: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgMemberProfileQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgMemberProfileKeys.detail(params.id), + queryFn: () => + getClient() + .orgMemberProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```ts + * const data = await fetchOrgMemberProfileQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchOrgMemberProfileQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgMemberProfileSelect>; +}): Promise<{ + orgMemberProfile: InferSelectResult | null; +}>; +export async function fetchOrgMemberProfileQuery(params: { + id: string; + selection: SelectionConfig; +}) { + const args = buildSelectionArgs(params.selection); + return getClient() + .orgMemberProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```ts + * await prefetchOrgMemberProfileQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchOrgMemberProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, OrgMemberProfileSelect>; + } +): Promise; +export async function prefetchOrgMemberProfileQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgMemberProfileKeys.detail(params.id), + queryFn: () => + getClient() + .orgMemberProfile.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useOrgMemberProfilesQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useOrgMemberProfilesQuery.ts new file mode 100644 index 000000000..4aa4c8d07 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useOrgMemberProfilesQuery.ts @@ -0,0 +1,163 @@ +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { orgMemberProfileKeys } from '../query-keys'; +import type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + OrgMemberProfileSelect, + OrgMemberProfileWithRelations, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const orgMemberProfilesQueryKey = orgMemberProfileKeys.list; +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```tsx + * const { data, isLoading } = useOrgMemberProfilesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useOrgMemberProfilesQuery< + S extends OrgMemberProfileSelect, + TData = { + orgMemberProfiles: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgMemberProfileSelect>; + } & Omit< + UseQueryOptions< + { + orgMemberProfiles: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useOrgMemberProfilesQuery( + params: { + selection: ListSelectionConfig< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: orgMemberProfileKeys.list(args), + queryFn: () => getClient().orgMemberProfile.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```ts + * const data = await fetchOrgMemberProfilesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchOrgMemberProfilesQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgMemberProfileSelect>; +}): Promise<{ + orgMemberProfiles: ConnectionResult>; +}>; +export async function fetchOrgMemberProfilesQuery(params: { + selection: ListSelectionConfig< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >; +}) { + const args = buildListSelectionArgs< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >(params.selection); + return getClient().orgMemberProfile.findMany(args).unwrap(); +} +/** + * Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) + * + * @example + * ```ts + * await prefetchOrgMemberProfilesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchOrgMemberProfilesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, OrgMemberProfileSelect>; + } +): Promise; +export async function prefetchOrgMemberProfilesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: orgMemberProfileKeys.list(args), + queryFn: () => getClient().orgMemberProfile.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useRequireStepUpQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useRequireStepUpQuery.ts new file mode 100644 index 000000000..115b29a85 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useRequireStepUpQuery.ts @@ -0,0 +1,105 @@ +/** + * Custom query hook for requireStepUp + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customQueryKeys } from '../query-keys'; +import type { RequireStepUpVariables } from '../../orm/query'; +export type { RequireStepUpVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const requireStepUpQueryKey = customQueryKeys.requireStepUp; +/** + * Query hook for requireStepUp + * + * @example + * ```tsx + * const { data, isLoading } = useRequireStepUpQuery({ variables: { stepUpType } }); + * + * if (data?.requireStepUp) { + * console.log(data.requireStepUp); + * } + * ``` + */ +export function useRequireStepUpQuery< + TData = { + requireStepUp: boolean | null; + }, +>( + params?: { + variables?: RequireStepUpVariables; + } & Omit< + UseQueryOptions< + { + requireStepUp: boolean | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useRequireStepUpQuery< + TData = { + requireStepUp: boolean | null; + }, +>( + params?: { + variables?: RequireStepUpVariables; + } & Omit< + UseQueryOptions< + { + requireStepUp: boolean | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: requireStepUpQueryKey(variables), + queryFn: () => getClient().query.requireStepUp(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch requireStepUp without React hooks + * + * @example + * ```ts + * const data = await fetchRequireStepUpQuery({ variables: { stepUpType } }); + * ``` + */ +export async function fetchRequireStepUpQuery(params?: { variables?: RequireStepUpVariables }) { + const variables = params?.variables ?? {}; + return getClient().query.requireStepUp(variables).unwrap(); +} +/** + * Prefetch requireStepUp for SSR or cache warming + * + * @example + * ```ts + * await prefetchRequireStepUpQuery(queryClient, { variables: { stepUpType } }); + * ``` + */ +export async function prefetchRequireStepUpQuery( + queryClient: QueryClient, + params?: { + variables?: RequireStepUpVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: requireStepUpQueryKey(variables), + queryFn: () => getClient().query.requireStepUp(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useResolveBlueprintFieldQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useResolveBlueprintFieldQuery.ts new file mode 100644 index 000000000..07a4c012d --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useResolveBlueprintFieldQuery.ts @@ -0,0 +1,107 @@ +/** + * Custom query hook for resolveBlueprintField + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { customQueryKeys } from '../query-keys'; +import type { ResolveBlueprintFieldVariables } from '../../orm/query'; +export type { ResolveBlueprintFieldVariables } from '../../orm/query'; +/** Query key factory - re-exported from query-keys.ts */ +export const resolveBlueprintFieldQueryKey = customQueryKeys.resolveBlueprintField; +/** + * Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + * + * @example + * ```tsx + * const { data, isLoading } = useResolveBlueprintFieldQuery({ variables: { databaseId, tableId, fieldName } }); + * + * if (data?.resolveBlueprintField) { + * console.log(data.resolveBlueprintField); + * } + * ``` + */ +export function useResolveBlueprintFieldQuery< + TData = { + resolveBlueprintField: string | null; + }, +>( + params?: { + variables?: ResolveBlueprintFieldVariables; + } & Omit< + UseQueryOptions< + { + resolveBlueprintField: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useResolveBlueprintFieldQuery< + TData = { + resolveBlueprintField: string | null; + }, +>( + params?: { + variables?: ResolveBlueprintFieldVariables; + } & Omit< + UseQueryOptions< + { + resolveBlueprintField: string | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult { + const variables = params?.variables ?? {}; + const { variables: _variables, ...queryOptions } = params ?? {}; + void _variables; + return useQuery({ + queryKey: resolveBlueprintFieldQueryKey(variables), + queryFn: () => getClient().query.resolveBlueprintField(variables).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch resolveBlueprintField without React hooks + * + * @example + * ```ts + * const data = await fetchResolveBlueprintFieldQuery({ variables: { databaseId, tableId, fieldName } }); + * ``` + */ +export async function fetchResolveBlueprintFieldQuery(params?: { + variables?: ResolveBlueprintFieldVariables; +}) { + const variables = params?.variables ?? {}; + return getClient().query.resolveBlueprintField(variables).unwrap(); +} +/** + * Prefetch resolveBlueprintField for SSR or cache warming + * + * @example + * ```ts + * await prefetchResolveBlueprintFieldQuery(queryClient, { variables: { databaseId, tableId, fieldName } }); + * ``` + */ +export async function prefetchResolveBlueprintFieldQuery( + queryClient: QueryClient, + params?: { + variables?: ResolveBlueprintFieldVariables; + } +): Promise { + const variables = params?.variables ?? {}; + await queryClient.prefetchQuery({ + queryKey: resolveBlueprintFieldQueryKey(variables), + queryFn: () => getClient().query.resolveBlueprintField(variables).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useSessionSecretsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSessionSecretsModuleQuery.ts new file mode 100644 index 000000000..67d69d950 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useSessionSecretsModuleQuery.ts @@ -0,0 +1,144 @@ +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { sessionSecretsModuleKeys } from '../query-keys'; +import type { + SessionSecretsModuleSelect, + SessionSecretsModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + SessionSecretsModuleSelect, + SessionSecretsModuleWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const sessionSecretsModuleQueryKey = sessionSecretsModuleKeys.detail; +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * + * @example + * ```tsx + * const { data, isLoading } = useSessionSecretsModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useSessionSecretsModuleQuery< + S extends SessionSecretsModuleSelect, + TData = { + sessionSecretsModule: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, SessionSecretsModuleSelect>; + } & Omit< + UseQueryOptions< + { + sessionSecretsModule: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useSessionSecretsModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: sessionSecretsModuleKeys.detail(params.id), + queryFn: () => + getClient() + .sessionSecretsModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * + * @example + * ```ts + * const data = await fetchSessionSecretsModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchSessionSecretsModuleQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, SessionSecretsModuleSelect>; +}): Promise<{ + sessionSecretsModule: InferSelectResult | null; +}>; +export async function fetchSessionSecretsModuleQuery(params: { + id: string; + selection: SelectionConfig; +}) { + const args = buildSelectionArgs(params.selection); + return getClient() + .sessionSecretsModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * + * @example + * ```ts + * await prefetchSessionSecretsModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchSessionSecretsModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, SessionSecretsModuleSelect>; + } +): Promise; +export async function prefetchSessionSecretsModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: sessionSecretsModuleKeys.detail(params.id), + queryFn: () => + getClient() + .sessionSecretsModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useSessionSecretsModulesQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSessionSecretsModulesQuery.ts new file mode 100644 index 000000000..be3f973f4 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useSessionSecretsModulesQuery.ts @@ -0,0 +1,178 @@ +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { sessionSecretsModuleKeys } from '../query-keys'; +import type { + SessionSecretsModuleSelect, + SessionSecretsModuleWithRelations, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + SessionSecretsModuleSelect, + SessionSecretsModuleWithRelations, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const sessionSecretsModulesQueryKey = sessionSecretsModuleKeys.list; +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * + * @example + * ```tsx + * const { data, isLoading } = useSessionSecretsModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useSessionSecretsModulesQuery< + S extends SessionSecretsModuleSelect, + TData = { + sessionSecretsModules: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, SessionSecretsModuleSelect>; + } & Omit< + UseQueryOptions< + { + sessionSecretsModules: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useSessionSecretsModulesQuery( + params: { + selection: ListSelectionConfig< + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: sessionSecretsModuleKeys.list(args), + queryFn: () => getClient().sessionSecretsModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * + * @example + * ```ts + * const data = await fetchSessionSecretsModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchSessionSecretsModulesQuery< + S extends SessionSecretsModuleSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, SessionSecretsModuleSelect>; +}): Promise<{ + sessionSecretsModules: ConnectionResult>; +}>; +export async function fetchSessionSecretsModulesQuery(params: { + selection: ListSelectionConfig< + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy + >(params.selection); + return getClient().sessionSecretsModule.findMany(args).unwrap(); +} +/** + * Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. + * + * @example + * ```ts + * await prefetchSessionSecretsModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchSessionSecretsModulesQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, SessionSecretsModuleSelect>; + } +): Promise; +export async function prefetchSessionSecretsModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: sessionSecretsModuleKeys.list(args), + queryFn: () => getClient().sessionSecretsModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useSpatialRelationQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSpatialRelationQuery.ts new file mode 100644 index 000000000..ae4ce4e89 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useSpatialRelationQuery.ts @@ -0,0 +1,138 @@ +/** + * Single item query hook for SpatialRelation + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { spatialRelationKeys } from '../query-keys'; +import type { SpatialRelationSelect, SpatialRelationWithRelations } from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { SpatialRelationSelect, SpatialRelationWithRelations } from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const spatialRelationQueryKey = spatialRelationKeys.detail; +/** + * Query hook for fetching a single SpatialRelation + * + * @example + * ```tsx + * const { data, isLoading } = useSpatialRelationQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useSpatialRelationQuery< + S extends SpatialRelationSelect, + TData = { + spatialRelation: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, SpatialRelationSelect>; + } & Omit< + UseQueryOptions< + { + spatialRelation: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useSpatialRelationQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: spatialRelationKeys.detail(params.id), + queryFn: () => + getClient() + .spatialRelation.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single SpatialRelation without React hooks + * + * @example + * ```ts + * const data = await fetchSpatialRelationQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchSpatialRelationQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, SpatialRelationSelect>; +}): Promise<{ + spatialRelation: InferSelectResult | null; +}>; +export async function fetchSpatialRelationQuery(params: { + id: string; + selection: SelectionConfig; +}) { + const args = buildSelectionArgs(params.selection); + return getClient() + .spatialRelation.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single SpatialRelation for SSR or cache warming + * + * @example + * ```ts + * await prefetchSpatialRelationQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchSpatialRelationQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, SpatialRelationSelect>; + } +): Promise; +export async function prefetchSpatialRelationQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: spatialRelationKeys.detail(params.id), + queryFn: () => + getClient() + .spatialRelation.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useSpatialRelationsQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useSpatialRelationsQuery.ts new file mode 100644 index 000000000..ea1a3996d --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useSpatialRelationsQuery.ts @@ -0,0 +1,163 @@ +/** + * List query hook for SpatialRelation + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { spatialRelationKeys } from '../query-keys'; +import type { + SpatialRelationSelect, + SpatialRelationWithRelations, + SpatialRelationFilter, + SpatialRelationOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + SpatialRelationSelect, + SpatialRelationWithRelations, + SpatialRelationFilter, + SpatialRelationOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const spatialRelationsQueryKey = spatialRelationKeys.list; +/** + * Query hook for fetching SpatialRelation list + * + * @example + * ```tsx + * const { data, isLoading } = useSpatialRelationsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useSpatialRelationsQuery< + S extends SpatialRelationSelect, + TData = { + spatialRelations: ConnectionResult>; + }, +>( + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, SpatialRelationSelect>; + } & Omit< + UseQueryOptions< + { + spatialRelations: ConnectionResult>; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useSpatialRelationsQuery( + params: { + selection: ListSelectionConfig< + SpatialRelationSelect, + SpatialRelationFilter, + SpatialRelationOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + SpatialRelationSelect, + SpatialRelationFilter, + SpatialRelationOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: spatialRelationKeys.list(args), + queryFn: () => getClient().spatialRelation.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch SpatialRelation list without React hooks + * + * @example + * ```ts + * const data = await fetchSpatialRelationsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchSpatialRelationsQuery(params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, SpatialRelationSelect>; +}): Promise<{ + spatialRelations: ConnectionResult>; +}>; +export async function fetchSpatialRelationsQuery(params: { + selection: ListSelectionConfig< + SpatialRelationSelect, + SpatialRelationFilter, + SpatialRelationOrderBy + >; +}) { + const args = buildListSelectionArgs< + SpatialRelationSelect, + SpatialRelationFilter, + SpatialRelationOrderBy + >(params.selection); + return getClient().spatialRelation.findMany(args).unwrap(); +} +/** + * Prefetch SpatialRelation list for SSR or cache warming + * + * @example + * ```ts + * await prefetchSpatialRelationsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchSpatialRelationsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit, 'fields'> & + HookStrictSelect, SpatialRelationSelect>; + } +): Promise; +export async function prefetchSpatialRelationsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + SpatialRelationSelect, + SpatialRelationFilter, + SpatialRelationOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + SpatialRelationSelect, + SpatialRelationFilter, + SpatialRelationOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: spatialRelationKeys.list(args), + queryFn: () => getClient().spatialRelation.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useTableTemplateModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useTableTemplateModuleQuery.ts deleted file mode 100644 index 7a60a5902..000000000 --- a/sdk/constructive-react/src/public/hooks/queries/useTableTemplateModuleQuery.ts +++ /dev/null @@ -1,144 +0,0 @@ -/** - * Single item query hook for TableTemplateModule - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useQuery } from '@tanstack/react-query'; -import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildSelectionArgs } from '../selection'; -import type { SelectionConfig } from '../selection'; -import { tableTemplateModuleKeys } from '../query-keys'; -import type { - TableTemplateModuleSelect, - TableTemplateModuleWithRelations, -} from '../../orm/input-types'; -import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; -export type { - TableTemplateModuleSelect, - TableTemplateModuleWithRelations, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const tableTemplateModuleQueryKey = tableTemplateModuleKeys.detail; -/** - * Query hook for fetching a single TableTemplateModule - * - * @example - * ```tsx - * const { data, isLoading } = useTableTemplateModuleQuery({ - * id: 'some-id', - * selection: { fields: { id: true, name: true } }, - * }); - * ``` - */ -export function useTableTemplateModuleQuery< - S extends TableTemplateModuleSelect, - TData = { - tableTemplateModule: InferSelectResult | null; - }, ->( - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, TableTemplateModuleSelect>; - } & Omit< - UseQueryOptions< - { - tableTemplateModule: InferSelectResult | null; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useTableTemplateModuleQuery( - params: { - id: string; - selection: SelectionConfig; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildSelectionArgs(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: tableTemplateModuleKeys.detail(params.id), - queryFn: () => - getClient() - .tableTemplateModule.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - ...queryOptions, - }); -} -/** - * Fetch a single TableTemplateModule without React hooks - * - * @example - * ```ts - * const data = await fetchTableTemplateModuleQuery({ - * id: 'some-id', - * selection: { fields: { id: true } }, - * }); - * ``` - */ -export async function fetchTableTemplateModuleQuery(params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, TableTemplateModuleSelect>; -}): Promise<{ - tableTemplateModule: InferSelectResult | null; -}>; -export async function fetchTableTemplateModuleQuery(params: { - id: string; - selection: SelectionConfig; -}) { - const args = buildSelectionArgs(params.selection); - return getClient() - .tableTemplateModule.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(); -} -/** - * Prefetch a single TableTemplateModule for SSR or cache warming - * - * @example - * ```ts - * await prefetchTableTemplateModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); - * ``` - */ -export async function prefetchTableTemplateModuleQuery( - queryClient: QueryClient, - params: { - id: string; - selection: { - fields: S; - } & HookStrictSelect, TableTemplateModuleSelect>; - } -): Promise; -export async function prefetchTableTemplateModuleQuery( - queryClient: QueryClient, - params: { - id: string; - selection: SelectionConfig; - } -): Promise { - const args = buildSelectionArgs(params.selection); - await queryClient.prefetchQuery({ - queryKey: tableTemplateModuleKeys.detail(params.id), - queryFn: () => - getClient() - .tableTemplateModule.findOne({ - id: params.id, - select: args.select, - }) - .unwrap(), - }); -} diff --git a/sdk/constructive-react/src/public/hooks/queries/useTableTemplateModulesQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useTableTemplateModulesQuery.ts deleted file mode 100644 index c0db523db..000000000 --- a/sdk/constructive-react/src/public/hooks/queries/useTableTemplateModulesQuery.ts +++ /dev/null @@ -1,174 +0,0 @@ -/** - * List query hook for TableTemplateModule - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ - -import { useQuery } from '@tanstack/react-query'; -import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; -import { getClient } from '../client'; -import { buildListSelectionArgs } from '../selection'; -import type { ListSelectionConfig } from '../selection'; -import { tableTemplateModuleKeys } from '../query-keys'; -import type { - TableTemplateModuleSelect, - TableTemplateModuleWithRelations, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy, -} from '../../orm/input-types'; -import type { - FindManyArgs, - InferSelectResult, - ConnectionResult, - HookStrictSelect, -} from '../../orm/select-types'; -export type { - TableTemplateModuleSelect, - TableTemplateModuleWithRelations, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy, -} from '../../orm/input-types'; -/** Query key factory - re-exported from query-keys.ts */ -export const tableTemplateModulesQueryKey = tableTemplateModuleKeys.list; -/** - * Query hook for fetching TableTemplateModule list - * - * @example - * ```tsx - * const { data, isLoading } = useTableTemplateModulesQuery({ - * selection: { - * fields: { id: true, name: true }, - * where: { name: { equalTo: "example" } }, - * orderBy: ['CREATED_AT_DESC'], - * first: 10, - * }, - * }); - * ``` - */ -export function useTableTemplateModulesQuery< - S extends TableTemplateModuleSelect, - TData = { - tableTemplateModules: ConnectionResult>; - }, ->( - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, TableTemplateModuleSelect>; - } & Omit< - UseQueryOptions< - { - tableTemplateModules: ConnectionResult< - InferSelectResult - >; - }, - Error, - TData - >, - 'queryKey' | 'queryFn' - > -): UseQueryResult; -export function useTableTemplateModulesQuery( - params: { - selection: ListSelectionConfig< - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy - >; - } & Omit, 'queryKey' | 'queryFn'> -) { - const args = buildListSelectionArgs< - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy - >(params.selection); - const { selection: _selection, ...queryOptions } = params ?? {}; - void _selection; - return useQuery({ - queryKey: tableTemplateModuleKeys.list(args), - queryFn: () => getClient().tableTemplateModule.findMany(args).unwrap(), - ...queryOptions, - }); -} -/** - * Fetch TableTemplateModule list without React hooks - * - * @example - * ```ts - * const data = await fetchTableTemplateModulesQuery({ - * selection: { - * fields: { id: true }, - * first: 10, - * }, - * }); - * ``` - */ -export async function fetchTableTemplateModulesQuery(params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, TableTemplateModuleSelect>; -}): Promise<{ - tableTemplateModules: ConnectionResult>; -}>; -export async function fetchTableTemplateModulesQuery(params: { - selection: ListSelectionConfig< - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy - >; -}) { - const args = buildListSelectionArgs< - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy - >(params.selection); - return getClient().tableTemplateModule.findMany(args).unwrap(); -} -/** - * Prefetch TableTemplateModule list for SSR or cache warming - * - * @example - * ```ts - * await prefetchTableTemplateModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); - * ``` - */ -export async function prefetchTableTemplateModulesQuery( - queryClient: QueryClient, - params: { - selection: { - fields: S; - } & Omit< - ListSelectionConfig, - 'fields' - > & - HookStrictSelect, TableTemplateModuleSelect>; - } -): Promise; -export async function prefetchTableTemplateModulesQuery( - queryClient: QueryClient, - params: { - selection: ListSelectionConfig< - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy - >; - } -): Promise { - const args = buildListSelectionArgs< - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy - >(params.selection); - await queryClient.prefetchQuery({ - queryKey: tableTemplateModuleKeys.list(args), - queryFn: () => getClient().tableTemplateModule.findMany(args).unwrap(), - }); -} diff --git a/sdk/constructive-react/src/public/hooks/queries/useUserConnectedAccountQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useUserConnectedAccountQuery.ts new file mode 100644 index 000000000..1008f06ca --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useUserConnectedAccountQuery.ts @@ -0,0 +1,144 @@ +/** + * Single item query hook for UserConnectedAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { userConnectedAccountKeys } from '../query-keys'; +import type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const userConnectedAccountQueryKey = userConnectedAccountKeys.detail; +/** + * Query hook for fetching a single UserConnectedAccount + * + * @example + * ```tsx + * const { data, isLoading } = useUserConnectedAccountQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useUserConnectedAccountQuery< + S extends UserConnectedAccountSelect, + TData = { + userConnectedAccount: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserConnectedAccountSelect>; + } & Omit< + UseQueryOptions< + { + userConnectedAccount: InferSelectResult | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useUserConnectedAccountQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: userConnectedAccountKeys.detail(params.id), + queryFn: () => + getClient() + .userConnectedAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Fetch a single UserConnectedAccount without React hooks + * + * @example + * ```ts + * const data = await fetchUserConnectedAccountQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchUserConnectedAccountQuery(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserConnectedAccountSelect>; +}): Promise<{ + userConnectedAccount: InferSelectResult | null; +}>; +export async function fetchUserConnectedAccountQuery(params: { + id: string; + selection: SelectionConfig; +}) { + const args = buildSelectionArgs(params.selection); + return getClient() + .userConnectedAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Prefetch a single UserConnectedAccount for SSR or cache warming + * + * @example + * ```ts + * await prefetchUserConnectedAccountQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchUserConnectedAccountQuery( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, UserConnectedAccountSelect>; + } +): Promise; +export async function prefetchUserConnectedAccountQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: userConnectedAccountKeys.detail(params.id), + queryFn: () => + getClient() + .userConnectedAccount.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useUserConnectedAccountsQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useUserConnectedAccountsQuery.ts new file mode 100644 index 000000000..f4e42d7af --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useUserConnectedAccountsQuery.ts @@ -0,0 +1,178 @@ +/** + * List query hook for UserConnectedAccount + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { userConnectedAccountKeys } from '../query-keys'; +import type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + UserConnectedAccountSelect, + UserConnectedAccountWithRelations, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const userConnectedAccountsQueryKey = userConnectedAccountKeys.list; +/** + * Query hook for fetching UserConnectedAccount list + * + * @example + * ```tsx + * const { data, isLoading } = useUserConnectedAccountsQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useUserConnectedAccountsQuery< + S extends UserConnectedAccountSelect, + TData = { + userConnectedAccounts: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserConnectedAccountSelect>; + } & Omit< + UseQueryOptions< + { + userConnectedAccounts: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useUserConnectedAccountsQuery( + params: { + selection: ListSelectionConfig< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: userConnectedAccountKeys.list(args), + queryFn: () => getClient().userConnectedAccount.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Fetch UserConnectedAccount list without React hooks + * + * @example + * ```ts + * const data = await fetchUserConnectedAccountsQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchUserConnectedAccountsQuery< + S extends UserConnectedAccountSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserConnectedAccountSelect>; +}): Promise<{ + userConnectedAccounts: ConnectionResult>; +}>; +export async function fetchUserConnectedAccountsQuery(params: { + selection: ListSelectionConfig< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >; +}) { + const args = buildListSelectionArgs< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >(params.selection); + return getClient().userConnectedAccount.findMany(args).unwrap(); +} +/** + * Prefetch UserConnectedAccount list for SSR or cache warming + * + * @example + * ```ts + * await prefetchUserConnectedAccountsQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchUserConnectedAccountsQuery( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, UserConnectedAccountSelect>; + } +): Promise; +export async function prefetchUserConnectedAccountsQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: userConnectedAccountKeys.list(args), + queryFn: () => getClient().userConnectedAccount.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialsModuleQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialsModuleQuery.ts new file mode 100644 index 000000000..8a52f6236 --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialsModuleQuery.ts @@ -0,0 +1,151 @@ +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildSelectionArgs } from '../selection'; +import type { SelectionConfig } from '../selection'; +import { webauthnCredentialsModuleKeys } from '../query-keys'; +import type { + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleWithRelations, +} from '../../orm/input-types'; +import type { InferSelectResult, HookStrictSelect } from '../../orm/select-types'; +export type { + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleWithRelations, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const webauthnCredentialsModuleQueryKey = webauthnCredentialsModuleKeys.detail; +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * + * @example + * ```tsx + * const { data, isLoading } = useWebauthnCredentialsModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true, name: true } }, + * }); + * ``` + */ +export function useWebauthnCredentialsModuleQuery< + S extends WebauthnCredentialsModuleSelect, + TData = { + webauthnCredentialsModule: InferSelectResult | null; + }, +>( + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, WebauthnCredentialsModuleSelect>; + } & Omit< + UseQueryOptions< + { + webauthnCredentialsModule: InferSelectResult< + WebauthnCredentialsModuleWithRelations, + S + > | null; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useWebauthnCredentialsModuleQuery( + params: { + id: string; + selection: SelectionConfig; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildSelectionArgs(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: webauthnCredentialsModuleKeys.detail(params.id), + queryFn: () => + getClient() + .webauthnCredentialsModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + ...queryOptions, + }); +} +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * + * @example + * ```ts + * const data = await fetchWebauthnCredentialsModuleQuery({ + * id: 'some-id', + * selection: { fields: { id: true } }, + * }); + * ``` + */ +export async function fetchWebauthnCredentialsModuleQuery< + S extends WebauthnCredentialsModuleSelect, +>(params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, WebauthnCredentialsModuleSelect>; +}): Promise<{ + webauthnCredentialsModule: InferSelectResult | null; +}>; +export async function fetchWebauthnCredentialsModuleQuery(params: { + id: string; + selection: SelectionConfig; +}) { + const args = buildSelectionArgs(params.selection); + return getClient() + .webauthnCredentialsModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(); +} +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * + * @example + * ```ts + * await prefetchWebauthnCredentialsModuleQuery(queryClient, { id: 'some-id', selection: { fields: { id: true } } }); + * ``` + */ +export async function prefetchWebauthnCredentialsModuleQuery< + S extends WebauthnCredentialsModuleSelect, +>( + queryClient: QueryClient, + params: { + id: string; + selection: { + fields: S; + } & HookStrictSelect, WebauthnCredentialsModuleSelect>; + } +): Promise; +export async function prefetchWebauthnCredentialsModuleQuery( + queryClient: QueryClient, + params: { + id: string; + selection: SelectionConfig; + } +): Promise { + const args = buildSelectionArgs(params.selection); + await queryClient.prefetchQuery({ + queryKey: webauthnCredentialsModuleKeys.detail(params.id), + queryFn: () => + getClient() + .webauthnCredentialsModule.findOne({ + id: params.id, + select: args.select, + }) + .unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialsModulesQuery.ts b/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialsModulesQuery.ts new file mode 100644 index 000000000..7b8177a2b --- /dev/null +++ b/sdk/constructive-react/src/public/hooks/queries/useWebauthnCredentialsModulesQuery.ts @@ -0,0 +1,182 @@ +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ + +import { useQuery } from '@tanstack/react-query'; +import type { UseQueryOptions, UseQueryResult, QueryClient } from '@tanstack/react-query'; +import { getClient } from '../client'; +import { buildListSelectionArgs } from '../selection'; +import type { ListSelectionConfig } from '../selection'; +import { webauthnCredentialsModuleKeys } from '../query-keys'; +import type { + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleWithRelations, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy, +} from '../../orm/input-types'; +import type { + FindManyArgs, + InferSelectResult, + ConnectionResult, + HookStrictSelect, +} from '../../orm/select-types'; +export type { + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleWithRelations, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy, +} from '../../orm/input-types'; +/** Query key factory - re-exported from query-keys.ts */ +export const webauthnCredentialsModulesQueryKey = webauthnCredentialsModuleKeys.list; +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * + * @example + * ```tsx + * const { data, isLoading } = useWebauthnCredentialsModulesQuery({ + * selection: { + * fields: { id: true, name: true }, + * where: { name: { equalTo: "example" } }, + * orderBy: ['CREATED_AT_DESC'], + * first: 10, + * }, + * }); + * ``` + */ +export function useWebauthnCredentialsModulesQuery< + S extends WebauthnCredentialsModuleSelect, + TData = { + webauthnCredentialsModules: ConnectionResult< + InferSelectResult + >; + }, +>( + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, WebauthnCredentialsModuleSelect>; + } & Omit< + UseQueryOptions< + { + webauthnCredentialsModules: ConnectionResult< + InferSelectResult + >; + }, + Error, + TData + >, + 'queryKey' | 'queryFn' + > +): UseQueryResult; +export function useWebauthnCredentialsModulesQuery( + params: { + selection: ListSelectionConfig< + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy + >; + } & Omit, 'queryKey' | 'queryFn'> +) { + const args = buildListSelectionArgs< + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy + >(params.selection); + const { selection: _selection, ...queryOptions } = params ?? {}; + void _selection; + return useQuery({ + queryKey: webauthnCredentialsModuleKeys.list(args), + queryFn: () => getClient().webauthnCredentialsModule.findMany(args).unwrap(), + ...queryOptions, + }); +} +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * + * @example + * ```ts + * const data = await fetchWebauthnCredentialsModulesQuery({ + * selection: { + * fields: { id: true }, + * first: 10, + * }, + * }); + * ``` + */ +export async function fetchWebauthnCredentialsModulesQuery< + S extends WebauthnCredentialsModuleSelect, +>(params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, WebauthnCredentialsModuleSelect>; +}): Promise<{ + webauthnCredentialsModules: ConnectionResult< + InferSelectResult + >; +}>; +export async function fetchWebauthnCredentialsModulesQuery(params: { + selection: ListSelectionConfig< + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy + >; +}) { + const args = buildListSelectionArgs< + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy + >(params.selection); + return getClient().webauthnCredentialsModule.findMany(args).unwrap(); +} +/** + * Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. + * + * @example + * ```ts + * await prefetchWebauthnCredentialsModulesQuery(queryClient, { selection: { fields: { id: true }, first: 10 } }); + * ``` + */ +export async function prefetchWebauthnCredentialsModulesQuery< + S extends WebauthnCredentialsModuleSelect, +>( + queryClient: QueryClient, + params: { + selection: { + fields: S; + } & Omit< + ListSelectionConfig, + 'fields' + > & + HookStrictSelect, WebauthnCredentialsModuleSelect>; + } +): Promise; +export async function prefetchWebauthnCredentialsModulesQuery( + queryClient: QueryClient, + params: { + selection: ListSelectionConfig< + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy + >; + } +): Promise { + const args = buildListSelectionArgs< + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy + >(params.selection); + await queryClient.prefetchQuery({ + queryKey: webauthnCredentialsModuleKeys.list(args), + queryFn: () => getClient().webauthnCredentialsModule.findMany(args).unwrap(), + }); +} diff --git a/sdk/constructive-react/src/public/hooks/query-keys.ts b/sdk/constructive-react/src/public/hooks/query-keys.ts index ddb21326f..908786025 100644 --- a/sdk/constructive-react/src/public/hooks/query-keys.ts +++ b/sdk/constructive-react/src/public/hooks/query-keys.ts @@ -127,6 +127,15 @@ export const fieldKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...fieldKeys.details(), id] as const, } as const; +export const spatialRelationKeys = { + /** All spatialRelation queries */ all: ['spatialrelation'] as const, + /** List query keys */ lists: () => [...spatialRelationKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...spatialRelationKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...spatialRelationKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...spatialRelationKeys.details(), id] as const, +} as const; export const foreignKeyConstraintKeys = { /** All foreignKeyConstraint queries */ all: ['foreignkeyconstraint'] as const, /** List query keys */ lists: () => [...foreignKeyConstraintKeys.all, 'list'] as const, @@ -244,15 +253,6 @@ export const embeddingChunkKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...embeddingChunkKeys.details(), id] as const, } as const; -export const tableTemplateModuleKeys = { - /** All tableTemplateModule queries */ all: ['tabletemplatemodule'] as const, - /** List query keys */ lists: () => [...tableTemplateModuleKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...tableTemplateModuleKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...tableTemplateModuleKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...tableTemplateModuleKeys.details(), id] as const, -} as const; export const secureTableProvisionKeys = { /** All secureTableProvision queries */ all: ['securetableprovision'] as const, /** List query keys */ lists: () => [...secureTableProvisionKeys.all, 'list'] as const, @@ -271,6 +271,15 @@ export const relationProvisionKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...relationProvisionKeys.details(), id] as const, } as const; +export const sessionSecretsModuleKeys = { + /** All sessionSecretsModule queries */ all: ['sessionsecretsmodule'] as const, + /** List query keys */ lists: () => [...sessionSecretsModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...sessionSecretsModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...sessionSecretsModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...sessionSecretsModuleKeys.details(), id] as const, +} as const; export const schemaGrantKeys = { /** All schemaGrant queries */ all: ['schemagrant'] as const, /** List query keys */ lists: () => [...schemaGrantKeys.all, 'list'] as const, @@ -604,6 +613,24 @@ export const storageModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...storageModuleKeys.details(), id] as const, } as const; +export const entityTypeProvisionKeys = { + /** All entityTypeProvision queries */ all: ['entitytypeprovision'] as const, + /** List query keys */ lists: () => [...entityTypeProvisionKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...entityTypeProvisionKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...entityTypeProvisionKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...entityTypeProvisionKeys.details(), id] as const, +} as const; +export const webauthnCredentialsModuleKeys = { + /** All webauthnCredentialsModule queries */ all: ['webauthncredentialsmodule'] as const, + /** List query keys */ lists: () => [...webauthnCredentialsModuleKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...webauthnCredentialsModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...webauthnCredentialsModuleKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...webauthnCredentialsModuleKeys.details(), id] as const, +} as const; export const databaseProvisionModuleKeys = { /** All databaseProvisionModule queries */ all: ['databaseprovisionmodule'] as const, /** List query keys */ lists: () => [...databaseProvisionModuleKeys.all, 'list'] as const, @@ -676,6 +703,15 @@ export const orgOwnerGrantKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgOwnerGrantKeys.details(), id] as const, } as const; +export const orgMemberProfileKeys = { + /** All orgMemberProfile queries */ all: ['orgmemberprofile'] as const, + /** List query keys */ lists: () => [...orgMemberProfileKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...orgMemberProfileKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...orgMemberProfileKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...orgMemberProfileKeys.details(), id] as const, +} as const; export const orgGrantKeys = { /** All orgGrant queries */ all: ['orggrant'] as const, /** List query keys */ lists: () => [...orgGrantKeys.all, 'list'] as const, @@ -784,15 +820,6 @@ export const cryptoAddressKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...cryptoAddressKeys.details(), id] as const, } as const; -export const connectedAccountKeys = { - /** All connectedAccount queries */ all: ['connectedaccount'] as const, - /** List query keys */ lists: () => [...connectedAccountKeys.all, 'list'] as const, - /** List query key with variables */ list: (variables?: object) => - [...connectedAccountKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...connectedAccountKeys.all, 'detail'] as const, - /** Detail query key for specific item */ detail: (id: string | number) => - [...connectedAccountKeys.details(), id] as const, -} as const; export const appInviteKeys = { /** All appInvite queries */ all: ['appinvite'] as const, /** List query keys */ lists: () => [...appInviteKeys.all, 'list'] as const, @@ -901,14 +928,23 @@ export const orgLimitDefaultKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...orgLimitDefaultKeys.details(), id] as const, } as const; -export const membershipTypeKeys = { - /** All membershipType queries */ all: ['membershiptype'] as const, - /** List query keys */ lists: () => [...membershipTypeKeys.all, 'list'] as const, +export const devicesModuleKeys = { + /** All devicesModule queries */ all: ['devicesmodule'] as const, + /** List query keys */ lists: () => [...devicesModuleKeys.all, 'list'] as const, /** List query key with variables */ list: (variables?: object) => - [...membershipTypeKeys.lists(), variables] as const, - /** Detail query keys */ details: () => [...membershipTypeKeys.all, 'detail'] as const, + [...devicesModuleKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...devicesModuleKeys.all, 'detail'] as const, /** Detail query key for specific item */ detail: (id: string | number) => - [...membershipTypeKeys.details(), id] as const, + [...devicesModuleKeys.details(), id] as const, +} as const; +export const userConnectedAccountKeys = { + /** All userConnectedAccount queries */ all: ['userconnectedaccount'] as const, + /** List query keys */ lists: () => [...userConnectedAccountKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...userConnectedAccountKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...userConnectedAccountKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...userConnectedAccountKeys.details(), id] as const, } as const; export const appMembershipDefaultKeys = { /** All appMembershipDefault queries */ all: ['appmembershipdefault'] as const, @@ -937,6 +973,15 @@ export const rateLimitsModuleKeys = { /** Detail query key for specific item */ detail: (id: string | number) => [...rateLimitsModuleKeys.details(), id] as const, } as const; +export const membershipTypeKeys = { + /** All membershipType queries */ all: ['membershiptype'] as const, + /** List query keys */ lists: () => [...membershipTypeKeys.all, 'list'] as const, + /** List query key with variables */ list: (variables?: object) => + [...membershipTypeKeys.lists(), variables] as const, + /** Detail query keys */ details: () => [...membershipTypeKeys.all, 'detail'] as const, + /** Detail query key for specific item */ detail: (id: string | number) => + [...membershipTypeKeys.details(), id] as const, +} as const; export const orgMembershipDefaultKeys = { /** All orgMembershipDefault queries */ all: ['orgmembershipdefault'] as const, /** List query keys */ lists: () => [...orgMembershipDefaultKeys.all, 'list'] as const, @@ -1007,8 +1052,10 @@ export const hierarchyModuleKeys = { export const customQueryKeys = { /** Query key for currentUserId */ currentUserId: () => ['currentUserId'] as const, - /** Query key for currentIpAddress */ currentIpAddress: () => ['currentIpAddress'] as const, /** Query key for currentUserAgent */ currentUserAgent: () => ['currentUserAgent'] as const, + /** Query key for currentIpAddress */ currentIpAddress: () => ['currentIpAddress'] as const, + /** Query key for requireStepUp */ requireStepUp: (variables?: object) => + ['requireStepUp', variables] as const, /** Query key for appPermissionsGetPaddedMask */ appPermissionsGetPaddedMask: ( variables?: object ) => ['appPermissionsGetPaddedMask', variables] as const, @@ -1018,6 +1065,8 @@ export const customQueryKeys = { /** Query key for stepsAchieved */ stepsAchieved: (variables?: object) => ['stepsAchieved', variables] as const, /** Query key for revParse */ revParse: (variables?: object) => ['revParse', variables] as const, + /** Query key for resolveBlueprintField */ resolveBlueprintField: (variables?: object) => + ['resolveBlueprintField', variables] as const, /** Query key for orgIsManagerOf */ orgIsManagerOf: (variables?: object) => ['orgIsManagerOf', variables] as const, /** Query key for appPermissionsGetMask */ appPermissionsGetMask: (variables?: object) => @@ -1081,6 +1130,7 @@ export const queryKeys = { table: tableKeys, checkConstraint: checkConstraintKeys, field: fieldKeys, + spatialRelation: spatialRelationKeys, foreignKeyConstraint: foreignKeyConstraintKeys, fullTextSearch: fullTextSearchKeys, index: indexKeys, @@ -1094,9 +1144,9 @@ export const queryKeys = { viewGrant: viewGrantKeys, viewRule: viewRuleKeys, embeddingChunk: embeddingChunkKeys, - tableTemplateModule: tableTemplateModuleKeys, secureTableProvision: secureTableProvisionKeys, relationProvision: relationProvisionKeys, + sessionSecretsModule: sessionSecretsModuleKeys, schemaGrant: schemaGrantKeys, defaultPrivilege: defaultPrivilegeKeys, enum: enumKeys, @@ -1134,6 +1184,8 @@ export const queryKeys = { blueprintTemplate: blueprintTemplateKeys, blueprintConstruction: blueprintConstructionKeys, storageModule: storageModuleKeys, + entityTypeProvision: entityTypeProvisionKeys, + webauthnCredentialsModule: webauthnCredentialsModuleKeys, databaseProvisionModule: databaseProvisionModuleKeys, appAdminGrant: appAdminGrantKeys, appOwnerGrant: appOwnerGrantKeys, @@ -1142,6 +1194,7 @@ export const queryKeys = { orgMember: orgMemberKeys, orgAdminGrant: orgAdminGrantKeys, orgOwnerGrant: orgOwnerGrantKeys, + orgMemberProfile: orgMemberProfileKeys, orgGrant: orgGrantKeys, orgChartEdge: orgChartEdgeKeys, orgChartEdgeGrant: orgChartEdgeGrantKeys, @@ -1154,7 +1207,6 @@ export const queryKeys = { email: emailKeys, phoneNumber: phoneNumberKeys, cryptoAddress: cryptoAddressKeys, - connectedAccount: connectedAccountKeys, appInvite: appInviteKeys, appClaimedInvite: appClaimedInviteKeys, orgInvite: orgInviteKeys, @@ -1167,10 +1219,12 @@ export const queryKeys = { migrateFile: migrateFileKeys, appLimitDefault: appLimitDefaultKeys, orgLimitDefault: orgLimitDefaultKeys, - membershipType: membershipTypeKeys, + devicesModule: devicesModuleKeys, + userConnectedAccount: userConnectedAccountKeys, appMembershipDefault: appMembershipDefaultKeys, commit: commitKeys, rateLimitsModule: rateLimitsModuleKeys, + membershipType: membershipTypeKeys, orgMembershipDefault: orgMembershipDefaultKeys, rlsModule: rlsModuleKeys, sqlAction: sqlActionKeys, diff --git a/sdk/constructive-react/src/public/orm/README.md b/sdk/constructive-react/src/public/orm/README.md index 9129a2618..752e931ea 100644 --- a/sdk/constructive-react/src/public/orm/README.md +++ b/sdk/constructive-react/src/public/orm/README.md @@ -33,6 +33,7 @@ const db = createClient({ | `table` | findMany, findOne, create, update, delete | | `checkConstraint` | findMany, findOne, create, update, delete | | `field` | findMany, findOne, create, update, delete | +| `spatialRelation` | findMany, findOne, create, update, delete | | `foreignKeyConstraint` | findMany, findOne, create, update, delete | | `fullTextSearch` | findMany, findOne, create, update, delete | | `index` | findMany, findOne, create, update, delete | @@ -46,9 +47,9 @@ const db = createClient({ | `viewGrant` | findMany, findOne, create, update, delete | | `viewRule` | findMany, findOne, create, update, delete | | `embeddingChunk` | findMany, findOne, create, update, delete | -| `tableTemplateModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | | `relationProvision` | findMany, findOne, create, update, delete | +| `sessionSecretsModule` | findMany, findOne, create, update, delete | | `schemaGrant` | findMany, findOne, create, update, delete | | `defaultPrivilege` | findMany, findOne, create, update, delete | | `enum` | findMany, findOne, create, update, delete | @@ -86,6 +87,8 @@ const db = createClient({ | `blueprintTemplate` | findMany, findOne, create, update, delete | | `blueprintConstruction` | findMany, findOne, create, update, delete | | `storageModule` | findMany, findOne, create, update, delete | +| `entityTypeProvision` | findMany, findOne, create, update, delete | +| `webauthnCredentialsModule` | findMany, findOne, create, update, delete | | `databaseProvisionModule` | findMany, findOne, create, update, delete | | `appAdminGrant` | findMany, findOne, create, update, delete | | `appOwnerGrant` | findMany, findOne, create, update, delete | @@ -94,6 +97,7 @@ const db = createClient({ | `orgMember` | findMany, findOne, create, update, delete | | `orgAdminGrant` | findMany, findOne, create, update, delete | | `orgOwnerGrant` | findMany, findOne, create, update, delete | +| `orgMemberProfile` | findMany, findOne, create, update, delete | | `orgGrant` | findMany, findOne, create, update, delete | | `orgChartEdge` | findMany, findOne, create, update, delete | | `orgChartEdgeGrant` | findMany, findOne, create, update, delete | @@ -106,7 +110,6 @@ const db = createClient({ | `email` | findMany, findOne, create, update, delete | | `phoneNumber` | findMany, findOne, create, update, delete | | `cryptoAddress` | findMany, findOne, create, update, delete | -| `connectedAccount` | findMany, findOne, create, update, delete | | `appInvite` | findMany, findOne, create, update, delete | | `appClaimedInvite` | findMany, findOne, create, update, delete | | `orgInvite` | findMany, findOne, create, update, delete | @@ -119,10 +122,12 @@ const db = createClient({ | `migrateFile` | findMany, findOne, create, update, delete | | `appLimitDefault` | findMany, findOne, create, update, delete | | `orgLimitDefault` | findMany, findOne, create, update, delete | -| `membershipType` | findMany, findOne, create, update, delete | +| `devicesModule` | findMany, findOne, create, update, delete | +| `userConnectedAccount` | findMany, findOne, create, update, delete | | `appMembershipDefault` | findMany, findOne, create, update, delete | | `commit` | findMany, findOne, create, update, delete | | `rateLimitsModule` | findMany, findOne, create, update, delete | +| `membershipType` | findMany, findOne, create, update, delete | | `orgMembershipDefault` | findMany, findOne, create, update, delete | | `rlsModule` | findMany, findOne, create, update, delete | | `sqlAction` | findMany, findOne, create, update, delete | @@ -580,6 +585,49 @@ const updated = await db.field.update({ where: { id: '' }, data: { databas const deleted = await db.field.delete({ where: { id: '' } }).execute(); ``` +### `db.spatialRelation` + +CRUD operations for SpatialRelation records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `fieldId` | UUID | Yes | +| `refTableId` | UUID | Yes | +| `refFieldId` | UUID | Yes | +| `name` | String | Yes | +| `operator` | String | Yes | +| `paramName` | String | Yes | +| `category` | ObjectCategory | Yes | +| `module` | String | Yes | +| `scope` | Int | Yes | +| `tags` | String | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all spatialRelation records +const items = await db.spatialRelation.findMany({ select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.spatialRelation.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', module: '', scope: '', tags: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.spatialRelation.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.spatialRelation.delete({ where: { id: '' } }).execute(); +``` + ### `db.foreignKeyConstraint` CRUD operations for ForeignKeyConstraint records. @@ -1107,43 +1155,6 @@ const updated = await db.embeddingChunk.update({ where: { id: '' }, data: const deleted = await db.embeddingChunk.delete({ where: { id: '' } }).execute(); ``` -### `db.tableTemplateModule` - -CRUD operations for TableTemplateModule records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | UUID | No | -| `databaseId` | UUID | Yes | -| `schemaId` | UUID | Yes | -| `privateSchemaId` | UUID | Yes | -| `tableId` | UUID | Yes | -| `ownerTableId` | UUID | Yes | -| `tableName` | String | Yes | -| `nodeType` | String | Yes | -| `data` | JSON | Yes | - -**Operations:** - -```typescript -// List all tableTemplateModule records -const items = await db.tableTemplateModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true, nodeType: true, data: true } }).execute(); - -// Get one by id -const item = await db.tableTemplateModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true, nodeType: true, data: true } }).execute(); - -// Create -const created = await db.tableTemplateModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '', nodeType: '', data: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.tableTemplateModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.tableTemplateModule.delete({ where: { id: '' } }).execute(); -``` - ### `db.secureTableProvision` CRUD operations for SecureTableProvision records. @@ -1247,6 +1258,40 @@ const updated = await db.relationProvision.update({ where: { id: '' }, dat const deleted = await db.relationProvision.delete({ where: { id: '' } }).execute(); ``` +### `db.sessionSecretsModule` + +CRUD operations for SessionSecretsModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `tableName` | String | Yes | +| `sessionsTableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all sessionSecretsModule records +const items = await db.sessionSecretsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } }).execute(); + +// Get one by id +const item = await db.sessionSecretsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } }).execute(); + +// Create +const created = await db.sessionSecretsModule.create({ data: { databaseId: '', schemaId: '', tableId: '', tableName: '', sessionsTableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.sessionSecretsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.sessionSecretsModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.schemaGrant` CRUD operations for SchemaGrant records. @@ -2204,18 +2249,19 @@ CRUD operations for MembershipsModule records. | `entityIdsByMask` | String | Yes | | `entityIdsByPerm` | String | Yes | | `entityIdsFunction` | String | Yes | +| `memberProfilesTableId` | UUID | Yes | **Operations:** ```typescript // List all membershipsModule records -const items = await db.membershipsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } }).execute(); +const items = await db.membershipsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } }).execute(); // Get one by id -const item = await db.membershipsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } }).execute(); +const item = await db.membershipsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } }).execute(); // Create -const created = await db.membershipsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '' }, select: { id: true } }).execute(); +const created = await db.membershipsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', memberProfilesTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.membershipsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -2453,21 +2499,21 @@ CRUD operations for UserAuthModule records. | `checkPasswordFunction` | String | Yes | | `sendAccountDeletionEmailFunction` | String | Yes | | `deleteAccountFunction` | String | Yes | -| `signInOneTimeTokenFunction` | String | Yes | -| `oneTimeTokenFunction` | String | Yes | +| `signInCrossOriginFunction` | String | Yes | +| `requestCrossOriginTokenFunction` | String | Yes | | `extendTokenExpires` | String | Yes | **Operations:** ```typescript // List all userAuthModule records -const items = await db.userAuthModule.findMany({ select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } }).execute(); +const items = await db.userAuthModule.findMany({ select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } }).execute(); // Get one by id -const item = await db.userAuthModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } }).execute(); +const item = await db.userAuthModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } }).execute(); // Create -const created = await db.userAuthModule.create({ data: { databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInOneTimeTokenFunction: '', oneTimeTokenFunction: '', extendTokenExpires: '' }, select: { id: true } }).execute(); +const created = await db.userAuthModule.create({ data: { databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInCrossOriginFunction: '', requestCrossOriginTokenFunction: '', extendTokenExpires: '' }, select: { id: true } }).execute(); // Update const updated = await db.userAuthModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -2686,6 +2732,86 @@ const updated = await db.storageModule.update({ where: { id: '' }, data: { const deleted = await db.storageModule.delete({ where: { id: '' } }).execute(); ``` +### `db.entityTypeProvision` + +CRUD operations for EntityTypeProvision records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `name` | String | Yes | +| `prefix` | String | Yes | +| `description` | String | Yes | +| `parentEntity` | String | Yes | +| `tableName` | String | Yes | +| `isVisible` | Boolean | Yes | +| `hasLimits` | Boolean | Yes | +| `hasProfiles` | Boolean | Yes | +| `hasLevels` | Boolean | Yes | +| `skipEntityPolicies` | Boolean | Yes | +| `tableProvision` | JSON | Yes | +| `outMembershipType` | Int | Yes | +| `outEntityTableId` | UUID | Yes | +| `outEntityTableName` | String | Yes | +| `outInstalledModules` | String | Yes | + +**Operations:** + +```typescript +// List all entityTypeProvision records +const items = await db.entityTypeProvision.findMany({ select: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } }).execute(); + +// Get one by id +const item = await db.entityTypeProvision.findOne({ id: '', select: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } }).execute(); + +// Create +const created = await db.entityTypeProvision.create({ data: { databaseId: '', name: '', prefix: '', description: '', parentEntity: '', tableName: '', isVisible: '', hasLimits: '', hasProfiles: '', hasLevels: '', skipEntityPolicies: '', tableProvision: '', outMembershipType: '', outEntityTableId: '', outEntityTableName: '', outInstalledModules: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.entityTypeProvision.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.entityTypeProvision.delete({ where: { id: '' } }).execute(); +``` + +### `db.webauthnCredentialsModule` + +CRUD operations for WebauthnCredentialsModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `privateSchemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `ownerTableId` | UUID | Yes | +| `tableName` | String | Yes | + +**Operations:** + +```typescript +// List all webauthnCredentialsModule records +const items = await db.webauthnCredentialsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } }).execute(); + +// Get one by id +const item = await db.webauthnCredentialsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } }).execute(); + +// Create +const created = await db.webauthnCredentialsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.webauthnCredentialsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.webauthnCredentialsModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.databaseProvisionModule` CRUD operations for DatabaseProvisionModule records. @@ -2848,25 +2974,27 @@ CRUD operations for OrgMembership records. | `isBanned` | Boolean | Yes | | `isDisabled` | Boolean | Yes | | `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isAdmin` | Boolean | Yes | | `permissions` | BitString | Yes | | `granted` | BitString | Yes | | `actorId` | UUID | Yes | | `entityId` | UUID | Yes | +| `isReadOnly` | Boolean | Yes | | `profileId` | UUID | Yes | **Operations:** ```typescript // List all orgMembership records -const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Get one by id -const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Create -const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }, select: { id: true } }).execute(); // Update const updated = await db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); @@ -2977,6 +3105,45 @@ const updated = await db.orgOwnerGrant.update({ where: { id: '' }, data: { const deleted = await db.orgOwnerGrant.delete({ where: { id: '' } }).execute(); ``` +### `db.orgMemberProfile` + +CRUD operations for OrgMemberProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `membershipId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `actorId` | UUID | Yes | +| `displayName` | String | Yes | +| `email` | String | Yes | +| `title` | String | Yes | +| `bio` | String | Yes | +| `profilePicture` | ConstructiveInternalTypeImage | Yes | + +**Operations:** + +```typescript +// List all orgMemberProfile records +const items = await db.orgMemberProfile.findMany({ select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Get one by id +const item = await db.orgMemberProfile.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Create +const created = await db.orgMemberProfile.create({ data: { membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgMemberProfile.update({ where: { id: '' }, data: { membershipId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgMemberProfile.delete({ where: { id: '' } }).execute(); +``` + ### `db.orgGrant` CRUD operations for OrgGrant records. @@ -3393,42 +3560,6 @@ const updated = await db.cryptoAddress.update({ where: { id: '' }, data: { const deleted = await db.cryptoAddress.delete({ where: { id: '' } }).execute(); ``` -### `db.connectedAccount` - -CRUD operations for ConnectedAccount records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | UUID | No | -| `ownerId` | UUID | Yes | -| `service` | String | Yes | -| `identifier` | String | Yes | -| `details` | JSON | Yes | -| `isVerified` | Boolean | Yes | -| `createdAt` | Datetime | No | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all connectedAccount records -const items = await db.connectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.connectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Create -const created = await db.connectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.connectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.connectedAccount.delete({ where: { id: '' } }).execute(); -``` - ### `db.appInvite` CRUD operations for AppInvite records. @@ -3835,36 +3966,75 @@ const updated = await db.orgLimitDefault.update({ where: { id: '' }, data: const deleted = await db.orgLimitDefault.delete({ where: { id: '' } }).execute(); ``` -### `db.membershipType` +### `db.devicesModule` -CRUD operations for MembershipType records. +CRUD operations for DevicesModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `id` | Int | No | -| `name` | String | Yes | -| `description` | String | Yes | -| `prefix` | String | Yes | +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `userDevicesTableId` | UUID | Yes | +| `deviceSettingsTableId` | UUID | Yes | +| `userDevicesTable` | String | Yes | +| `deviceSettingsTable` | String | Yes | **Operations:** ```typescript -// List all membershipType records -const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true } }).execute(); +// List all devicesModule records +const items = await db.devicesModule.findMany({ select: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } }).execute(); // Get one by id -const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true } }).execute(); +const item = await db.devicesModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } }).execute(); // Create -const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '' }, select: { id: true } }).execute(); +const created = await db.devicesModule.create({ data: { databaseId: '', schemaId: '', userDevicesTableId: '', deviceSettingsTableId: '', userDevicesTable: '', deviceSettingsTable: '' }, select: { id: true } }).execute(); // Update -const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); +const updated = await db.devicesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); +const deleted = await db.devicesModule.delete({ where: { id: '' } }).execute(); +``` + +### `db.userConnectedAccount` + +CRUD operations for UserConnectedAccount records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `ownerId` | UUID | Yes | +| `service` | String | Yes | +| `identifier` | String | Yes | +| `details` | JSON | Yes | +| `isVerified` | Boolean | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all userConnectedAccount records +const items = await db.userConnectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.userConnectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.userConnectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userConnectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userConnectedAccount.delete({ where: { id: '' } }).execute(); ``` ### `db.appMembershipDefault` @@ -3976,6 +4146,40 @@ const updated = await db.rateLimitsModule.update({ where: { id: '' }, data const deleted = await db.rateLimitsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.membershipType` + +CRUD operations for MembershipType records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | Int | No | +| `name` | String | Yes | +| `description` | String | Yes | +| `prefix` | String | Yes | +| `parentMembershipType` | Int | Yes | +| `hasUsersTableEntry` | Boolean | Yes | + +**Operations:** + +```typescript +// List all membershipType records +const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Get one by id +const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Create +const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); +``` + ### `db.orgMembershipDefault` CRUD operations for OrgMembershipDefault records. @@ -4194,6 +4398,7 @@ CRUD operations for AppMembership records. | `isDisabled` | Boolean | Yes | | `isVerified` | Boolean | Yes | | `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isAdmin` | Boolean | Yes | | `permissions` | BitString | Yes | @@ -4205,13 +4410,13 @@ CRUD operations for AppMembership records. ```typescript // List all appMembership records -const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Get one by id -const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Create -const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); // Update const updated = await db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); @@ -4281,6 +4486,17 @@ currentUserId const result = await db.query.currentUserId().execute(); ``` +### `db.query.currentUserAgent` + +currentUserAgent + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.currentUserAgent().execute(); +``` + ### `db.query.currentIpAddress` currentIpAddress @@ -4292,15 +4508,19 @@ currentIpAddress const result = await db.query.currentIpAddress().execute(); ``` -### `db.query.currentUserAgent` +### `db.query.requireStepUp` -currentUserAgent +requireStepUp - **Type:** query -- **Arguments:** none +- **Arguments:** + + | Argument | Type | + |----------|------| + | `stepUpType` | String | ```typescript -const result = await db.query.currentUserAgent().execute(); +const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); ``` ### `db.query.appPermissionsGetPaddedMask` @@ -4366,6 +4586,23 @@ revParse const result = await db.query.revParse({ dbId: '', storeId: '', refname: '' }).execute(); ``` +### `db.query.resolveBlueprintField` + +Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `databaseId` | UUID | + | `tableId` | UUID | + | `fieldName` | String | + +```typescript +const result = await db.query.resolveBlueprintField({ databaseId: '', tableId: '', fieldName: '' }).execute(); +``` + ### `db.query.orgIsManagerOf` orgIsManagerOf @@ -4661,6 +4898,51 @@ rejectDatabaseTransfer const result = await db.mutation.rejectDatabaseTransfer({ input: { transferId: '' } }).execute(); ``` +### `db.mutation.disconnectAccount` + +disconnectAccount + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DisconnectAccountInput (required) | + +```typescript +const result = await db.mutation.disconnectAccount({ input: { accountId: '' } }).execute(); +``` + +### `db.mutation.revokeApiKey` + +revokeApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeApiKeyInput (required) | + +```typescript +const result = await db.mutation.revokeApiKey({ input: { keyId: '' } }).execute(); +``` + +### `db.mutation.revokeSession` + +revokeSession + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeSessionInput (required) | + +```typescript +const result = await db.mutation.revokeSession({ input: { sessionId: '' } }).execute(); +``` + ### `db.mutation.verifyPassword` verifyPassword @@ -4813,7 +5095,7 @@ const result = await db.mutation.initEmptyRepo({ input: { dbId: '', storeI ### `db.mutation.constructBlueprint` -Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. +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. - **Type:** mutation - **Arguments:** @@ -4826,6 +5108,21 @@ Executes a blueprint definition by delegating to provision_* procedures. Creates const result = await db.mutation.constructBlueprint({ input: { blueprintId: '', schemaId: '' } }).execute(); ``` +### `db.mutation.provisionNewUser` + +provisionNewUser + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionNewUserInput (required) | + +```typescript +const result = await db.mutation.provisionNewUser({ input: { email: '', password: '' } }).execute(); +``` + ### `db.mutation.resetPassword` resetPassword @@ -4871,6 +5168,36 @@ Creates a new blueprint by copying a template definition. Checks visibility: own const result = await db.mutation.copyTemplateToBlueprint({ input: { templateId: '', databaseId: '', ownerId: '', nameOverride: '', displayNameOverride: '' } }).execute(); ``` +### `db.mutation.createApiKey` + +createApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateApiKeyInput (required) | + +```typescript +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }).execute(); +``` + +### `db.mutation.provisionSpatialRelation` + +Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionSpatialRelationInput (required) | + +```typescript +const result = await db.mutation.provisionSpatialRelation({ input: '' }).execute(); +``` + ### `db.mutation.bootstrapUser` bootstrapUser @@ -5066,19 +5393,19 @@ applyRls const result = await db.mutation.applyRls({ input: '' }).execute(); ``` -### `db.mutation.signInOneTimeToken` +### `db.mutation.signInCrossOrigin` -signInOneTimeToken +signInCrossOrigin - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInOneTimeTokenInput (required) | + | `input` | SignInCrossOriginInput (required) | ```typescript -const result = await db.mutation.signInOneTimeToken({ input: { token: '', credentialKind: '' } }).execute(); +const result = await db.mutation.signInCrossOrigin({ input: { token: '', credentialKind: '' } }).execute(); ``` ### `db.mutation.createUserDatabase` @@ -5127,49 +5454,49 @@ extendTokenExpires const result = await db.mutation.extendTokenExpires({ input: { amount: '' } }).execute(); ``` -### `db.mutation.signIn` +### `db.mutation.signUp` -signIn +signUp - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInInput (required) | + | `input` | SignUpInput (required) | ```typescript -const result = await db.mutation.signIn({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.signUp({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); ``` -### `db.mutation.signUp` +### `db.mutation.requestCrossOriginToken` -signUp +requestCrossOriginToken - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignUpInput (required) | + | `input` | RequestCrossOriginTokenInput (required) | ```typescript -const result = await db.mutation.signUp({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.requestCrossOriginToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); ``` -### `db.mutation.oneTimeToken` +### `db.mutation.signIn` -oneTimeToken +signIn - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | OneTimeTokenInput (required) | + | `input` | SignInInput (required) | ```typescript -const result = await db.mutation.oneTimeToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +const result = await db.mutation.signIn({ input: '' }).execute(); ``` ### `db.mutation.provisionTable` diff --git a/sdk/constructive-react/src/public/orm/index.ts b/sdk/constructive-react/src/public/orm/index.ts index 0d921879c..b097a4036 100644 --- a/sdk/constructive-react/src/public/orm/index.ts +++ b/sdk/constructive-react/src/public/orm/index.ts @@ -17,6 +17,7 @@ import { SchemaModel } from './models/schema'; import { TableModel } from './models/table'; import { CheckConstraintModel } from './models/checkConstraint'; import { FieldModel } from './models/field'; +import { SpatialRelationModel } from './models/spatialRelation'; import { ForeignKeyConstraintModel } from './models/foreignKeyConstraint'; import { FullTextSearchModel } from './models/fullTextSearch'; import { IndexModel } from './models/index'; @@ -30,9 +31,9 @@ import { ViewTableModel } from './models/viewTable'; import { ViewGrantModel } from './models/viewGrant'; import { ViewRuleModel } from './models/viewRule'; import { EmbeddingChunkModel } from './models/embeddingChunk'; -import { TableTemplateModuleModel } from './models/tableTemplateModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; import { RelationProvisionModel } from './models/relationProvision'; +import { SessionSecretsModuleModel } from './models/sessionSecretsModule'; import { SchemaGrantModel } from './models/schemaGrant'; import { DefaultPrivilegeModel } from './models/defaultPrivilege'; import { EnumModel } from './models/enum'; @@ -70,6 +71,8 @@ import { BlueprintModel } from './models/blueprint'; import { BlueprintTemplateModel } from './models/blueprintTemplate'; import { BlueprintConstructionModel } from './models/blueprintConstruction'; import { StorageModuleModel } from './models/storageModule'; +import { EntityTypeProvisionModel } from './models/entityTypeProvision'; +import { WebauthnCredentialsModuleModel } from './models/webauthnCredentialsModule'; import { DatabaseProvisionModuleModel } from './models/databaseProvisionModule'; import { AppAdminGrantModel } from './models/appAdminGrant'; import { AppOwnerGrantModel } from './models/appOwnerGrant'; @@ -78,6 +81,7 @@ import { OrgMembershipModel } from './models/orgMembership'; import { OrgMemberModel } from './models/orgMember'; import { OrgAdminGrantModel } from './models/orgAdminGrant'; import { OrgOwnerGrantModel } from './models/orgOwnerGrant'; +import { OrgMemberProfileModel } from './models/orgMemberProfile'; import { OrgGrantModel } from './models/orgGrant'; import { OrgChartEdgeModel } from './models/orgChartEdge'; import { OrgChartEdgeGrantModel } from './models/orgChartEdgeGrant'; @@ -90,7 +94,6 @@ import { AppLevelModel } from './models/appLevel'; import { EmailModel } from './models/email'; import { PhoneNumberModel } from './models/phoneNumber'; import { CryptoAddressModel } from './models/cryptoAddress'; -import { ConnectedAccountModel } from './models/connectedAccount'; import { AppInviteModel } from './models/appInvite'; import { AppClaimedInviteModel } from './models/appClaimedInvite'; import { OrgInviteModel } from './models/orgInvite'; @@ -103,10 +106,12 @@ import { RoleTypeModel } from './models/roleType'; import { MigrateFileModel } from './models/migrateFile'; import { AppLimitDefaultModel } from './models/appLimitDefault'; import { OrgLimitDefaultModel } from './models/orgLimitDefault'; -import { MembershipTypeModel } from './models/membershipType'; +import { DevicesModuleModel } from './models/devicesModule'; +import { UserConnectedAccountModel } from './models/userConnectedAccount'; import { AppMembershipDefaultModel } from './models/appMembershipDefault'; import { CommitModel } from './models/commit'; import { RateLimitsModuleModel } from './models/rateLimitsModule'; +import { MembershipTypeModel } from './models/membershipType'; import { OrgMembershipDefaultModel } from './models/orgMembershipDefault'; import { RlsModuleModel } from './models/rlsModule'; import { SqlActionModel } from './models/sqlAction'; @@ -161,6 +166,7 @@ export function createClient(config: OrmClientConfig) { table: new TableModel(client), checkConstraint: new CheckConstraintModel(client), field: new FieldModel(client), + spatialRelation: new SpatialRelationModel(client), foreignKeyConstraint: new ForeignKeyConstraintModel(client), fullTextSearch: new FullTextSearchModel(client), index: new IndexModel(client), @@ -174,9 +180,9 @@ export function createClient(config: OrmClientConfig) { viewGrant: new ViewGrantModel(client), viewRule: new ViewRuleModel(client), embeddingChunk: new EmbeddingChunkModel(client), - tableTemplateModule: new TableTemplateModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), relationProvision: new RelationProvisionModel(client), + sessionSecretsModule: new SessionSecretsModuleModel(client), schemaGrant: new SchemaGrantModel(client), defaultPrivilege: new DefaultPrivilegeModel(client), enum: new EnumModel(client), @@ -214,6 +220,8 @@ export function createClient(config: OrmClientConfig) { blueprintTemplate: new BlueprintTemplateModel(client), blueprintConstruction: new BlueprintConstructionModel(client), storageModule: new StorageModuleModel(client), + entityTypeProvision: new EntityTypeProvisionModel(client), + webauthnCredentialsModule: new WebauthnCredentialsModuleModel(client), databaseProvisionModule: new DatabaseProvisionModuleModel(client), appAdminGrant: new AppAdminGrantModel(client), appOwnerGrant: new AppOwnerGrantModel(client), @@ -222,6 +230,7 @@ export function createClient(config: OrmClientConfig) { orgMember: new OrgMemberModel(client), orgAdminGrant: new OrgAdminGrantModel(client), orgOwnerGrant: new OrgOwnerGrantModel(client), + orgMemberProfile: new OrgMemberProfileModel(client), orgGrant: new OrgGrantModel(client), orgChartEdge: new OrgChartEdgeModel(client), orgChartEdgeGrant: new OrgChartEdgeGrantModel(client), @@ -234,7 +243,6 @@ export function createClient(config: OrmClientConfig) { email: new EmailModel(client), phoneNumber: new PhoneNumberModel(client), cryptoAddress: new CryptoAddressModel(client), - connectedAccount: new ConnectedAccountModel(client), appInvite: new AppInviteModel(client), appClaimedInvite: new AppClaimedInviteModel(client), orgInvite: new OrgInviteModel(client), @@ -247,10 +255,12 @@ export function createClient(config: OrmClientConfig) { migrateFile: new MigrateFileModel(client), appLimitDefault: new AppLimitDefaultModel(client), orgLimitDefault: new OrgLimitDefaultModel(client), - membershipType: new MembershipTypeModel(client), + devicesModule: new DevicesModuleModel(client), + userConnectedAccount: new UserConnectedAccountModel(client), appMembershipDefault: new AppMembershipDefaultModel(client), commit: new CommitModel(client), rateLimitsModule: new RateLimitsModuleModel(client), + membershipType: new MembershipTypeModel(client), orgMembershipDefault: new OrgMembershipDefaultModel(client), rlsModule: new RlsModuleModel(client), sqlAction: new SqlActionModel(client), diff --git a/sdk/constructive-react/src/public/orm/input-types.ts b/sdk/constructive-react/src/public/orm/input-types.ts index 60b4df70c..32d62b5eb 100644 --- a/sdk/constructive-react/src/public/orm/input-types.ts +++ b/sdk/constructive-react/src/public/orm/input-types.ts @@ -392,6 +392,23 @@ export interface Field { createdAt?: string | null; updatedAt?: string | null; } +export interface SpatialRelation { + id: string; + databaseId?: string | null; + tableId?: string | null; + fieldId?: string | null; + refTableId?: string | null; + refFieldId?: string | null; + name?: string | null; + operator?: string | null; + paramName?: string | null; + category?: ObjectCategory | null; + module?: string | null; + scope?: number | null; + tags?: string[] | null; + createdAt?: string | null; + updatedAt?: string | null; +} export interface ForeignKeyConstraint { id: string; databaseId?: string | null; @@ -585,17 +602,6 @@ export interface EmbeddingChunk { createdAt?: string | null; updatedAt?: string | null; } -export interface TableTemplateModule { - id: string; - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - tableId?: string | null; - ownerTableId?: string | null; - tableName?: string | null; - nodeType?: string | null; - data?: Record | null; -} /** Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. */ export interface SecureTableProvision { /** Unique identifier for this provision row. */ @@ -785,6 +791,16 @@ export interface RelationProvision { /** Output column for RelationManyToMany: the UUID of the FK field on the junction table referencing the target table. Populated by the trigger. NULL for RelationBelongsTo/RelationHasOne. Callers should not set this directly. */ outTargetFieldId?: string | null; } +/** Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. */ +export interface SessionSecretsModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; + /** Resolved reference to sessions_module.sessions_table, used to FK session_secrets.session_id with ON DELETE CASCADE. */ + sessionsTableId?: string | null; +} export interface SchemaGrant { id: string; databaseId?: string | null; @@ -1149,6 +1165,7 @@ export interface MembershipsModule { entityIdsByMask?: string | null; entityIdsByPerm?: string | null; entityIdsFunction?: string | null; + memberProfilesTableId?: string | null; } export interface PermissionsModule { id: string; @@ -1242,8 +1259,8 @@ export interface UserAuthModule { checkPasswordFunction?: string | null; sendAccountDeletionEmailFunction?: string | null; deleteAccountFunction?: string | null; - signInOneTimeTokenFunction?: string | null; - oneTimeTokenFunction?: string | null; + signInCrossOriginFunction?: string | null; + requestCrossOriginTokenFunction?: string | null; extendTokenExpires?: string | null; } export interface UsersModule { @@ -1372,6 +1389,153 @@ export interface StorageModule { maxFilenameLength?: number | null; cacheTtlSeconds?: number | null; } +/** + * 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. + */ +export interface EntityTypeProvision { + /** Unique identifier for this provision row. */ + id: string; + /** The database to provision this entity type in. Required. */ + databaseId?: string | null; + /** + * Human-readable name for this membership type, e.g. 'Data Room Member', 'Team Channel Member'. Required. + * Stored in the membership_types registry table. + */ + name?: string | null; + /** + * SQL prefix used for table and module naming, e.g. 'data_room', 'team_channel'. Required. + * Drives entity table name (prefix || 's' by default), module labels (permissions_module:prefix), + * and membership table names (prefix_memberships, prefix_members, etc.). + * Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING. + */ + prefix?: string | null; + /** Description of this membership type. Stored in the membership_types registry table. Defaults to empty string. */ + description?: string | null; + /** + * Prefix of the parent entity type. The trigger resolves this to a membership_type integer + * by looking up memberships_module WHERE prefix = parent_entity. + * Defaults to 'org' (the organization-level type). For nested types, set to the parent's prefix + * (e.g. 'data_room' for a team_channel nested under data_room). + * The parent type must already be provisioned before this INSERT. + */ + parentEntity?: string | null; + /** + * Override the entity table name. When NULL (default), the table name is derived as prefix || 's' + * (e.g. prefix 'data_room' produces table 'data_rooms'). + * Set this when the pluralization rule doesn't apply (e.g. prefix 'staff' should produce 'staff' not 'staffs'). + */ + tableName?: string | null; + /** + * Whether members of the parent entity can see child entities. Defaults to true. + * When true: a SELECT policy allows parent members to list child entities (e.g. org members can see all data rooms). + * When false: only direct members of the entity itself can see it (private entity mode). + * Controls whether the parent_member SELECT policy is created on the entity table. + * Only meaningful on the defaults path — ignored (no-op) when table_provision is non-NULL or + * skip_entity_policies=true, since no default policies are being applied in those cases. + */ + isVisible?: boolean | null; + /** + * Whether to apply limits_module security for this type. Defaults to false. + * The limits_module table structure is always created (memberships_module requires it), + * but when false, no RLS policies are applied to the limits tables. + * Set to true if this entity type needs configurable resource limits per membership. + */ + hasLimits?: boolean | null; + /** + * Whether to provision profiles_module for this type. Defaults to false. + * Profiles provide named permission roles (e.g. 'Editor', 'Viewer') with pre-configured permission bitmasks. + * When true, creates profile tables and applies profiles security. + */ + hasProfiles?: boolean | null; + /** + * Whether to provision levels_module for this type. Defaults to false. + * Levels provide gamification/achievement tracking for members. + * When true, creates level steps, achievements, and level tables with security. + */ + hasLevels?: boolean | null; + /** + * Escape hatch: when true, apply zero RLS policies to the entity table. Defaults to false. + * Use this only when you want the entity table provisioned with zero policies (e.g. because you + * plan to insert secure_table_provision rows yourself later). In most cases, prefer leaving this + * false and either accepting the five defaults (table_provision=NULL) or overriding them via + * table_provision. + * Defaults (applied when table_provision IS NULL and skip_entity_policies=false): + * - SELECT (parent_member): parent entity members can see child entities (only when is_visible=true) + * - SELECT (self_member): direct members of the entity can see it + * - INSERT: create_entity permission on the parent entity + * - UPDATE: admin_entity permission on the entity itself + * - DELETE: owner of the entity can delete it + */ + skipEntityPolicies?: boolean | null; + /** + * Single jsonb object describing the full security setup to apply to the entity table. + * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * entries, so an entity table is configured the same way an ordinary blueprint table is. + * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by + * table_provision.policies[] (is_visible becomes a no-op on this path). + * Recognized keys (all optional): + * - use_rls (boolean, default true) + * - nodes (jsonb array of {"$type","data"} Data* module entries) + * - fields (jsonb array of field objects: name,type,is_required,default,min,max,regexp,index) + * - grant_privileges (jsonb array of [privilege, columns] tuples) + * - grant_roles (jsonb array of role names; defaults to ["authenticated"]) + * - policies (jsonb array of policy objects; each with $type, privileges, data, name, role, permissive) + * The trigger fans policies[] into N secure_table_provision rows against the newly created entity table, + * with table-level setup (nodes/fields/grants) attached to the first row. + * Example — override with two SELECT policies: + * table_provision := jsonb_build_object( + * 'policies', jsonb_build_array( + * jsonb_build_object( + * '$type', 'AuthzEntityMembership', + * 'privileges', jsonb_build_array('select'), + * 'data', jsonb_build_object('entity_field', 'id', 'membership_type', 3), + * 'name', 'self_member' + * ), + * jsonb_build_object( + * '$type', 'AuthzDirectOwner', + * 'privileges', jsonb_build_array('select', 'update'), + * 'data', jsonb_build_object('owner_field', 'owner_id') + * ) + * ) + * ) + */ + tableProvision?: Record | null; + /** + * Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning. + * This is the ID used in membership_types, memberships_module, and all module tables. + */ + outMembershipType?: number | null; + /** + * Output: the UUID of the created entity table. Populated by the trigger. + * Use this to reference the entity table in subsequent relation_provision or secure_table_provision rows. + */ + outEntityTableId?: string | null; + /** Output: the name of the created entity table (e.g. 'data_rooms'). Populated by the trigger. */ + outEntityTableName?: string | null; + /** + * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Populated by the trigger. Useful for verifying which modules were provisioned. + */ + outInstalledModules?: string[] | null; +} +/** Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. */ +export interface WebauthnCredentialsModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + /** Reserved for future SECURITY DEFINER helpers on webauthn_credentials; unused in Phase 11a. */ + privateSchemaId?: string | null; + tableId?: string | null; + ownerTableId?: string | null; + tableName?: string | null; +} /** Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. */ export interface DatabaseProvisionModule { id: string; @@ -1448,6 +1612,8 @@ export interface OrgMembership { isDisabled?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -1460,6 +1626,8 @@ export interface OrgMembership { actorId?: string | null; /** References the entity (org or group) this membership belongs to */ entityId?: string | null; + /** Whether this member has read-only access (blocks mutations when true) */ + isReadOnly?: boolean | null; profileId?: string | null; } /** Simplified view of active members in an entity, used for listing who belongs to an org or group */ @@ -1498,6 +1666,28 @@ export interface OrgOwnerGrant { createdAt?: string | null; updatedAt?: string | null; } +/** Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) */ +export interface OrgMemberProfile { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** References the membership this profile belongs to (1:1) */ + membershipId?: string | null; + /** References the entity this profile belongs to (used for RLS lookups) */ + entityId?: string | null; + /** References the user who owns this profile (for self-edit RLS) */ + actorId?: string | null; + /** Display name shown to other entity members */ + displayName?: string | null; + /** Email address visible to other entity members (auto-populated from verified primary email) */ + email?: string | null; + /** Job title or role description visible to other entity members */ + title?: string | null; + /** Short biography visible to other entity members */ + bio?: string | null; + /** Profile picture visible to other entity members */ + profilePicture?: ConstructiveInternalTypeImage | null; +} /** Records of individual permission grants and revocations for members via bitmask */ export interface OrgGrant { id: string; @@ -1659,21 +1849,6 @@ export interface CryptoAddress { createdAt?: string | null; updatedAt?: string | null; } -/** OAuth and social login connections linking external service accounts to users */ -export interface ConnectedAccount { - id: string; - ownerId?: string | null; - /** The service used, e.g. `twitter` or `github`. */ - service?: string | null; - /** A unique identifier for the user within the service */ - identifier?: string | null; - /** Additional profile details extracted from this login method */ - details?: Record | null; - /** Whether this connected account has been verified */ - isVerified?: boolean | null; - createdAt?: string | null; - updatedAt?: string | null; -} /** Invitation records sent to prospective members via email, with token-based redemption and expiration */ export interface AppInvite { id: string; @@ -1821,16 +1996,24 @@ export interface OrgLimitDefault { /** Default maximum usage allowed for this limit */ max?: number | null; } -/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ -export interface MembershipType { - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; - /** Human-readable name of the membership type */ - name?: string | null; - /** Description of what this membership type represents */ - description?: string | null; - /** Short prefix used to namespace tables and functions for this membership scope */ - prefix?: string | null; +export interface DevicesModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + userDevicesTableId?: string | null; + deviceSettingsTableId?: string | null; + userDevicesTable?: string | null; + deviceSettingsTable?: string | null; +} +export interface UserConnectedAccount { + id: string; + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; + createdAt?: string | null; + updatedAt?: string | null; } /** Default membership settings per entity, controlling initial approval and verification state for new members */ export interface AppMembershipDefault { @@ -1874,6 +2057,21 @@ export interface RateLimitsModule { ipRateLimitsTable?: string | null; rateLimitsTable?: string | null; } +/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ +export interface MembershipType { + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; + /** Human-readable name of the membership type */ + name?: string | null; + /** Description of what this membership type represents */ + description?: string | null; + /** Short prefix used to namespace tables and functions for this membership scope */ + prefix?: string | null; + /** Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) */ + parentMembershipType?: number | null; + /** When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs */ + hasUsersTableEntry?: boolean | null; +} /** Default membership settings per entity, controlling initial approval and verification state for new members */ export interface OrgMembershipDefault { id: string; @@ -1966,6 +2164,8 @@ export interface AppMembership { isVerified?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -2025,6 +2225,7 @@ export interface DatabaseRelations { rlsModule?: RlsModule | null; hierarchyModule?: HierarchyModule | null; rateLimitsModule?: RateLimitsModule | null; + devicesModule?: DevicesModule | null; schemas?: ConnectionResult; tables?: ConnectionResult
; checkConstraints?: ConnectionResult; @@ -2045,6 +2246,7 @@ export interface DatabaseRelations { defaultPrivileges?: ConnectionResult; enums?: ConnectionResult; embeddingChunks?: ConnectionResult; + spatialRelations?: ConnectionResult; databaseTransfers?: ConnectionResult; apis?: ConnectionResult; apiModules?: ConnectionResult; @@ -2074,12 +2276,14 @@ export interface DatabaseRelations { sessionsModules?: ConnectionResult; userAuthModules?: ConnectionResult; usersModules?: ConnectionResult; - tableTemplateModules?: ConnectionResult; secureTableProvisions?: ConnectionResult; relationProvisions?: ConnectionResult; blueprints?: ConnectionResult; blueprintConstructions?: ConnectionResult; storageModules?: ConnectionResult; + entityTypeProvisions?: ConnectionResult; + sessionSecretsModules?: ConnectionResult; + webauthnCredentialsModules?: ConnectionResult; databaseProvisionModules?: ConnectionResult; } export interface SchemaRelations { @@ -2090,8 +2294,7 @@ export interface SchemaRelations { defaultPrivileges?: ConnectionResult; enums?: ConnectionResult; apiSchemas?: ConnectionResult; - tableTemplateModulesByPrivateSchemaId?: ConnectionResult; - tableTemplateModules?: ConnectionResult; + sessionSecretsModules?: ConnectionResult; } export interface TableRelations { database?: Database | null; @@ -2111,11 +2314,13 @@ export interface TableRelations { viewTables?: ConnectionResult; embeddingChunksByChunksTableId?: ConnectionResult; embeddingChunks?: ConnectionResult; - tableTemplateModulesByOwnerTableId?: ConnectionResult; - tableTemplateModules?: ConnectionResult; + spatialRelationsByRefTableId?: ConnectionResult; + spatialRelations?: ConnectionResult; secureTableProvisions?: ConnectionResult; relationProvisionsBySourceTableId?: ConnectionResult; relationProvisionsByTargetTableId?: ConnectionResult; + sessionSecretsModulesBySessionsTableId?: ConnectionResult; + sessionSecretsModules?: ConnectionResult; } export interface CheckConstraintRelations { database?: Database | null; @@ -2124,6 +2329,15 @@ export interface CheckConstraintRelations { export interface FieldRelations { database?: Database | null; table?: Table | null; + spatialRelations?: ConnectionResult; + spatialRelationsByRefFieldId?: ConnectionResult; +} +export interface SpatialRelationRelations { + database?: Database | null; + field?: Field | null; + refField?: Field | null; + refTable?: Table | null; + table?: Table | null; } export interface ForeignKeyConstraintRelations { database?: Database | null; @@ -2185,13 +2399,6 @@ export interface EmbeddingChunkRelations { parentFkField?: Field | null; table?: Table | null; } -export interface TableTemplateModuleRelations { - database?: Database | null; - ownerTable?: Table | null; - privateSchema?: Schema | null; - schema?: Schema | null; - table?: Table | null; -} export interface SecureTableProvisionRelations { database?: Database | null; schema?: Schema | null; @@ -2202,6 +2409,12 @@ export interface RelationProvisionRelations { sourceTable?: Table | null; targetTable?: Table | null; } +export interface SessionSecretsModuleRelations { + database?: Database | null; + schema?: Schema | null; + sessionsTable?: Table | null; + table?: Table | null; +} export interface SchemaGrantRelations { database?: Database | null; schema?: Schema | null; @@ -2441,6 +2654,16 @@ export interface StorageModuleRelations { schema?: Schema | null; uploadRequestsTable?: Table | null; } +export interface EntityTypeProvisionRelations { + database?: Database | null; +} +export interface WebauthnCredentialsModuleRelations { + database?: Database | null; + ownerTable?: Table | null; + privateSchema?: Schema | null; + schema?: Schema | null; + table?: Table | null; +} export interface DatabaseProvisionModuleRelations { database?: Database | null; } @@ -2459,6 +2682,7 @@ export interface AppGrantRelations { export interface OrgMembershipRelations { actor?: User | null; entity?: User | null; + orgMemberProfileByMembershipId?: OrgMemberProfile | null; } export interface OrgMemberRelations { actor?: User | null; @@ -2474,6 +2698,11 @@ export interface OrgOwnerGrantRelations { entity?: User | null; grantor?: User | null; } +export interface OrgMemberProfileRelations { + actor?: User | null; + entity?: User | null; + membership?: OrgMembership | null; +} export interface OrgGrantRelations { actor?: User | null; entity?: User | null; @@ -2518,9 +2747,6 @@ export interface PhoneNumberRelations { export interface CryptoAddressRelations { owner?: User | null; } -export interface ConnectedAccountRelations { - owner?: User | null; -} export interface AppInviteRelations { sender?: User | null; } @@ -2548,7 +2774,13 @@ export interface RoleTypeRelations {} export interface MigrateFileRelations {} export interface AppLimitDefaultRelations {} export interface OrgLimitDefaultRelations {} -export interface MembershipTypeRelations {} +export interface DevicesModuleRelations { + database?: Database | null; + deviceSettingsTableByDeviceSettingsTableId?: Table | null; + schema?: Schema | null; + userDevicesTableByUserDevicesTableId?: Table | null; +} +export interface UserConnectedAccountRelations {} export interface AppMembershipDefaultRelations {} export interface CommitRelations {} export interface RateLimitsModuleRelations { @@ -2558,6 +2790,7 @@ export interface RateLimitsModuleRelations { rateLimitsTableByRateLimitsTableId?: Table | null; schema?: Schema | null; } +export interface MembershipTypeRelations {} export interface OrgMembershipDefaultRelations { entity?: User | null; } @@ -2591,6 +2824,8 @@ export interface UserRelations { orgOwnerGrantsByActorId?: ConnectionResult; orgOwnerGrantsByEntityId?: ConnectionResult; orgOwnerGrantsByGrantorId?: ConnectionResult; + orgMemberProfilesByActorId?: ConnectionResult; + orgMemberProfilesByEntityId?: ConnectionResult; orgGrantsByActorId?: ConnectionResult; orgGrantsByEntityId?: ConnectionResult; orgGrantsByGrantorId?: ConnectionResult; @@ -2611,7 +2846,6 @@ export interface UserRelations { ownedEmails?: ConnectionResult; ownedPhoneNumbers?: ConnectionResult; ownedCryptoAddresses?: ConnectionResult; - ownedConnectedAccounts?: ConnectionResult; appInvitesBySenderId?: ConnectionResult; appClaimedInvitesByReceiverId?: ConnectionResult; appClaimedInvitesBySenderId?: ConnectionResult; @@ -2652,6 +2886,7 @@ export type SchemaWithRelations = Schema & SchemaRelations; export type TableWithRelations = Table & TableRelations; export type CheckConstraintWithRelations = CheckConstraint & CheckConstraintRelations; export type FieldWithRelations = Field & FieldRelations; +export type SpatialRelationWithRelations = SpatialRelation & SpatialRelationRelations; export type ForeignKeyConstraintWithRelations = ForeignKeyConstraint & ForeignKeyConstraintRelations; export type FullTextSearchWithRelations = FullTextSearch & FullTextSearchRelations; @@ -2667,10 +2902,11 @@ export type ViewTableWithRelations = ViewTable & ViewTableRelations; export type ViewGrantWithRelations = ViewGrant & ViewGrantRelations; export type ViewRuleWithRelations = ViewRule & ViewRuleRelations; export type EmbeddingChunkWithRelations = EmbeddingChunk & EmbeddingChunkRelations; -export type TableTemplateModuleWithRelations = TableTemplateModule & TableTemplateModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; export type RelationProvisionWithRelations = RelationProvision & RelationProvisionRelations; +export type SessionSecretsModuleWithRelations = SessionSecretsModule & + SessionSecretsModuleRelations; export type SchemaGrantWithRelations = SchemaGrant & SchemaGrantRelations; export type DefaultPrivilegeWithRelations = DefaultPrivilege & DefaultPrivilegeRelations; export type EnumWithRelations = Enum & EnumRelations; @@ -2714,6 +2950,9 @@ export type BlueprintTemplateWithRelations = BlueprintTemplate & BlueprintTempla export type BlueprintConstructionWithRelations = BlueprintConstruction & BlueprintConstructionRelations; export type StorageModuleWithRelations = StorageModule & StorageModuleRelations; +export type EntityTypeProvisionWithRelations = EntityTypeProvision & EntityTypeProvisionRelations; +export type WebauthnCredentialsModuleWithRelations = WebauthnCredentialsModule & + WebauthnCredentialsModuleRelations; export type DatabaseProvisionModuleWithRelations = DatabaseProvisionModule & DatabaseProvisionModuleRelations; export type AppAdminGrantWithRelations = AppAdminGrant & AppAdminGrantRelations; @@ -2723,6 +2962,7 @@ export type OrgMembershipWithRelations = OrgMembership & OrgMembershipRelations; export type OrgMemberWithRelations = OrgMember & OrgMemberRelations; export type OrgAdminGrantWithRelations = OrgAdminGrant & OrgAdminGrantRelations; export type OrgOwnerGrantWithRelations = OrgOwnerGrant & OrgOwnerGrantRelations; +export type OrgMemberProfileWithRelations = OrgMemberProfile & OrgMemberProfileRelations; export type OrgGrantWithRelations = OrgGrant & OrgGrantRelations; export type OrgChartEdgeWithRelations = OrgChartEdge & OrgChartEdgeRelations; export type OrgChartEdgeGrantWithRelations = OrgChartEdgeGrant & OrgChartEdgeGrantRelations; @@ -2736,7 +2976,6 @@ export type AppLevelWithRelations = AppLevel & AppLevelRelations; export type EmailWithRelations = Email & EmailRelations; export type PhoneNumberWithRelations = PhoneNumber & PhoneNumberRelations; export type CryptoAddressWithRelations = CryptoAddress & CryptoAddressRelations; -export type ConnectedAccountWithRelations = ConnectedAccount & ConnectedAccountRelations; export type AppInviteWithRelations = AppInvite & AppInviteRelations; export type AppClaimedInviteWithRelations = AppClaimedInvite & AppClaimedInviteRelations; export type OrgInviteWithRelations = OrgInvite & OrgInviteRelations; @@ -2750,11 +2989,14 @@ export type RoleTypeWithRelations = RoleType & RoleTypeRelations; export type MigrateFileWithRelations = MigrateFile & MigrateFileRelations; export type AppLimitDefaultWithRelations = AppLimitDefault & AppLimitDefaultRelations; export type OrgLimitDefaultWithRelations = OrgLimitDefault & OrgLimitDefaultRelations; -export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; +export type DevicesModuleWithRelations = DevicesModule & DevicesModuleRelations; +export type UserConnectedAccountWithRelations = UserConnectedAccount & + UserConnectedAccountRelations; export type AppMembershipDefaultWithRelations = AppMembershipDefault & AppMembershipDefaultRelations; export type CommitWithRelations = Commit & CommitRelations; export type RateLimitsModuleWithRelations = RateLimitsModule & RateLimitsModuleRelations; +export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type OrgMembershipDefaultWithRelations = OrgMembershipDefault & OrgMembershipDefaultRelations; export type RlsModuleWithRelations = RlsModule & RlsModuleRelations; @@ -2831,6 +3073,9 @@ export type DatabaseSelect = { rateLimitsModule?: { select: RateLimitsModuleSelect; }; + devicesModule?: { + select: DevicesModuleSelect; + }; schemas?: { select: SchemaSelect; first?: number; @@ -2951,6 +3196,12 @@ export type DatabaseSelect = { filter?: EmbeddingChunkFilter; orderBy?: EmbeddingChunkOrderBy[]; }; + spatialRelations?: { + select: SpatialRelationSelect; + first?: number; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; + }; databaseTransfers?: { select: DatabaseTransferSelect; first?: number; @@ -3125,12 +3376,6 @@ export type DatabaseSelect = { filter?: UsersModuleFilter; orderBy?: UsersModuleOrderBy[]; }; - tableTemplateModules?: { - select: TableTemplateModuleSelect; - first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; - }; secureTableProvisions?: { select: SecureTableProvisionSelect; first?: number; @@ -3161,6 +3406,24 @@ export type DatabaseSelect = { filter?: StorageModuleFilter; orderBy?: StorageModuleOrderBy[]; }; + entityTypeProvisions?: { + select: EntityTypeProvisionSelect; + first?: number; + filter?: EntityTypeProvisionFilter; + orderBy?: EntityTypeProvisionOrderBy[]; + }; + sessionSecretsModules?: { + select: SessionSecretsModuleSelect; + first?: number; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; + }; + webauthnCredentialsModules?: { + select: WebauthnCredentialsModuleSelect; + first?: number; + filter?: WebauthnCredentialsModuleFilter; + orderBy?: WebauthnCredentialsModuleOrderBy[]; + }; databaseProvisionModules?: { select: DatabaseProvisionModuleSelect; first?: number; @@ -3222,17 +3485,11 @@ export type SchemaSelect = { filter?: ApiSchemaFilter; orderBy?: ApiSchemaOrderBy[]; }; - tableTemplateModulesByPrivateSchemaId?: { - select: TableTemplateModuleSelect; - first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; - }; - tableTemplateModules?: { - select: TableTemplateModuleSelect; + sessionSecretsModules?: { + select: SessionSecretsModuleSelect; first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; }; }; export type TableSelect = { @@ -3348,17 +3605,17 @@ export type TableSelect = { filter?: EmbeddingChunkFilter; orderBy?: EmbeddingChunkOrderBy[]; }; - tableTemplateModulesByOwnerTableId?: { - select: TableTemplateModuleSelect; + spatialRelationsByRefTableId?: { + select: SpatialRelationSelect; first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; }; - tableTemplateModules?: { - select: TableTemplateModuleSelect; + spatialRelations?: { + select: SpatialRelationSelect; first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; }; secureTableProvisions?: { select: SecureTableProvisionSelect; @@ -3378,6 +3635,18 @@ export type TableSelect = { filter?: RelationProvisionFilter; orderBy?: RelationProvisionOrderBy[]; }; + sessionSecretsModulesBySessionsTableId?: { + select: SessionSecretsModuleSelect; + first?: number; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; + }; + sessionSecretsModules?: { + select: SessionSecretsModuleSelect; + first?: number; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; + }; }; export type CheckConstraintSelect = { id?: boolean; @@ -3432,6 +3701,50 @@ export type FieldSelect = { table?: { select: TableSelect; }; + spatialRelations?: { + select: SpatialRelationSelect; + first?: number; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; + }; + spatialRelationsByRefFieldId?: { + select: SpatialRelationSelect; + first?: number; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; + }; +}; +export type SpatialRelationSelect = { + id?: boolean; + databaseId?: boolean; + tableId?: boolean; + fieldId?: boolean; + refTableId?: boolean; + refFieldId?: boolean; + name?: boolean; + operator?: boolean; + paramName?: boolean; + category?: boolean; + module?: boolean; + scope?: boolean; + tags?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + database?: { + select: DatabaseSelect; + }; + field?: { + select: FieldSelect; + }; + refField?: { + select: FieldSelect; + }; + refTable?: { + select: TableSelect; + }; + table?: { + select: TableSelect; + }; }; export type ForeignKeyConstraintSelect = { id?: boolean; @@ -3733,32 +4046,6 @@ export type EmbeddingChunkSelect = { select: TableSelect; }; }; -export type TableTemplateModuleSelect = { - id?: boolean; - databaseId?: boolean; - schemaId?: boolean; - privateSchemaId?: boolean; - tableId?: boolean; - ownerTableId?: boolean; - tableName?: boolean; - nodeType?: boolean; - data?: boolean; - database?: { - select: DatabaseSelect; - }; - ownerTable?: { - select: TableSelect; - }; - privateSchema?: { - select: SchemaSelect; - }; - schema?: { - select: SchemaSelect; - }; - table?: { - select: TableSelect; - }; -}; export type SecureTableProvisionSelect = { id?: boolean; databaseId?: boolean; @@ -3828,6 +4115,26 @@ export type RelationProvisionSelect = { select: TableSelect; }; }; +export type SessionSecretsModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + tableId?: boolean; + tableName?: boolean; + sessionsTableId?: boolean; + database?: { + select: DatabaseSelect; + }; + schema?: { + select: SchemaSelect; + }; + sessionsTable?: { + select: TableSelect; + }; + table?: { + select: TableSelect; + }; +}; export type SchemaGrantSelect = { id?: boolean; databaseId?: boolean; @@ -4422,6 +4729,7 @@ export type MembershipsModuleSelect = { entityIdsByMask?: boolean; entityIdsByPerm?: boolean; entityIdsFunction?: boolean; + memberProfilesTableId?: boolean; actorTable?: { select: TableSelect; }; @@ -4656,8 +4964,8 @@ export type UserAuthModuleSelect = { checkPasswordFunction?: boolean; sendAccountDeletionEmailFunction?: boolean; deleteAccountFunction?: boolean; - signInOneTimeTokenFunction?: boolean; - oneTimeTokenFunction?: boolean; + signInCrossOriginFunction?: boolean; + requestCrossOriginTokenFunction?: boolean; extendTokenExpires?: boolean; database?: { select: DatabaseSelect; @@ -4830,6 +5138,52 @@ export type StorageModuleSelect = { select: TableSelect; }; }; +export type EntityTypeProvisionSelect = { + id?: boolean; + databaseId?: boolean; + name?: boolean; + prefix?: boolean; + description?: boolean; + parentEntity?: boolean; + tableName?: boolean; + isVisible?: boolean; + hasLimits?: boolean; + hasProfiles?: boolean; + hasLevels?: boolean; + skipEntityPolicies?: boolean; + tableProvision?: boolean; + outMembershipType?: boolean; + outEntityTableId?: boolean; + outEntityTableName?: boolean; + outInstalledModules?: boolean; + database?: { + select: DatabaseSelect; + }; +}; +export type WebauthnCredentialsModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + privateSchemaId?: boolean; + tableId?: boolean; + ownerTableId?: boolean; + tableName?: boolean; + database?: { + select: DatabaseSelect; + }; + ownerTable?: { + select: TableSelect; + }; + privateSchema?: { + select: SchemaSelect; + }; + schema?: { + select: SchemaSelect; + }; + table?: { + select: TableSelect; + }; +}; export type DatabaseProvisionModuleSelect = { id?: boolean; databaseName?: boolean; @@ -4902,12 +5256,14 @@ export type OrgMembershipSelect = { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; granted?: boolean; actorId?: boolean; entityId?: boolean; + isReadOnly?: boolean; profileId?: boolean; actor?: { select: UserSelect; @@ -4915,6 +5271,9 @@ export type OrgMembershipSelect = { entity?: { select: UserSelect; }; + orgMemberProfileByMembershipId?: { + select: OrgMemberProfileSelect; + }; }; export type OrgMemberSelect = { id?: boolean; @@ -4964,6 +5323,28 @@ export type OrgOwnerGrantSelect = { select: UserSelect; }; }; +export type OrgMemberProfileSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + membershipId?: boolean; + entityId?: boolean; + actorId?: boolean; + displayName?: boolean; + email?: boolean; + title?: boolean; + bio?: boolean; + profilePicture?: boolean; + actor?: { + select: UserSelect; + }; + entity?: { + select: UserSelect; + }; + membership?: { + select: OrgMembershipSelect; + }; +}; export type OrgGrantSelect = { id?: boolean; permissions?: boolean; @@ -5128,19 +5509,6 @@ export type CryptoAddressSelect = { select: UserSelect; }; }; -export type ConnectedAccountSelect = { - id?: boolean; - ownerId?: boolean; - service?: boolean; - identifier?: boolean; - details?: boolean; - isVerified?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - owner?: { - select: UserSelect; - }; -}; export type AppInviteSelect = { id?: boolean; email?: boolean; @@ -5265,11 +5633,36 @@ export type OrgLimitDefaultSelect = { name?: boolean; max?: boolean; }; -export type MembershipTypeSelect = { +export type DevicesModuleSelect = { id?: boolean; - name?: boolean; - description?: boolean; - prefix?: boolean; + databaseId?: boolean; + schemaId?: boolean; + userDevicesTableId?: boolean; + deviceSettingsTableId?: boolean; + userDevicesTable?: boolean; + deviceSettingsTable?: boolean; + database?: { + select: DatabaseSelect; + }; + deviceSettingsTableByDeviceSettingsTableId?: { + select: TableSelect; + }; + schema?: { + select: SchemaSelect; + }; + userDevicesTableByUserDevicesTableId?: { + select: TableSelect; + }; +}; +export type UserConnectedAccountSelect = { + id?: boolean; + ownerId?: boolean; + service?: boolean; + identifier?: boolean; + details?: boolean; + isVerified?: boolean; + createdAt?: boolean; + updatedAt?: boolean; }; export type AppMembershipDefaultSelect = { id?: boolean; @@ -5317,6 +5710,14 @@ export type RateLimitsModuleSelect = { select: SchemaSelect; }; }; +export type MembershipTypeSelect = { + id?: boolean; + name?: boolean; + description?: boolean; + prefix?: boolean; + parentMembershipType?: boolean; + hasUsersTableEntry?: boolean; +}; export type OrgMembershipDefaultSelect = { id?: boolean; createdAt?: boolean; @@ -5500,6 +5901,18 @@ export type UserSelect = { filter?: OrgOwnerGrantFilter; orderBy?: OrgOwnerGrantOrderBy[]; }; + orgMemberProfilesByActorId?: { + select: OrgMemberProfileSelect; + first?: number; + filter?: OrgMemberProfileFilter; + orderBy?: OrgMemberProfileOrderBy[]; + }; + orgMemberProfilesByEntityId?: { + select: OrgMemberProfileSelect; + first?: number; + filter?: OrgMemberProfileFilter; + orderBy?: OrgMemberProfileOrderBy[]; + }; orgGrantsByActorId?: { select: OrgGrantSelect; first?: number; @@ -5620,12 +6033,6 @@ export type UserSelect = { filter?: CryptoAddressFilter; orderBy?: CryptoAddressOrderBy[]; }; - ownedConnectedAccounts?: { - select: ConnectedAccountSelect; - first?: number; - filter?: ConnectedAccountFilter; - orderBy?: ConnectedAccountOrderBy[]; - }; appInvitesBySenderId?: { select: AppInviteSelect; first?: number; @@ -5713,6 +6120,7 @@ export type AppMembershipSelect = { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; @@ -5980,6 +6388,10 @@ export interface DatabaseFilter { embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: DatabaseToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `databaseTransfers` relation. */ databaseTransfers?: DatabaseToManyDatabaseTransferFilter; /** `databaseTransfers` exist. */ @@ -6104,10 +6516,6 @@ export interface DatabaseFilter { hierarchyModule?: HierarchyModuleFilter; /** A related `hierarchyModule` exists. */ hierarchyModuleExists?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: DatabaseToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: DatabaseToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -6128,10 +6536,26 @@ export interface DatabaseFilter { storageModules?: DatabaseToManyStorageModuleFilter; /** `storageModules` exist. */ storageModulesExist?: boolean; + /** Filter by the object’s `entityTypeProvisions` relation. */ + entityTypeProvisions?: DatabaseToManyEntityTypeProvisionFilter; + /** `entityTypeProvisions` exist. */ + entityTypeProvisionsExist?: boolean; /** Filter by the object’s `rateLimitsModule` relation. */ rateLimitsModule?: RateLimitsModuleFilter; /** A related `rateLimitsModule` exists. */ rateLimitsModuleExists?: boolean; + /** Filter by the object’s `devicesModule` relation. */ + devicesModule?: DevicesModuleFilter; + /** A related `devicesModule` exists. */ + devicesModuleExists?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: DatabaseToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; + /** Filter by the object’s `webauthnCredentialsModules` relation. */ + webauthnCredentialsModules?: DatabaseToManyWebauthnCredentialsModuleFilter; + /** `webauthnCredentialsModules` exist. */ + webauthnCredentialsModulesExist?: boolean; /** Filter by the object’s `databaseProvisionModules` relation. */ databaseProvisionModules?: DatabaseToManyDatabaseProvisionModuleFilter; /** `databaseProvisionModules` exist. */ @@ -6198,14 +6622,10 @@ export interface SchemaFilter { apiSchemas?: SchemaToManyApiSchemaFilter; /** `apiSchemas` exist. */ apiSchemasExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByPrivateSchemaId` relation. */ - tableTemplateModulesByPrivateSchemaId?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByPrivateSchemaId` exist. */ - tableTemplateModulesByPrivateSchemaIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: SchemaToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } export interface TableFilter { /** Filter by the object’s `id` field. */ @@ -6316,14 +6736,14 @@ export interface TableFilter { embeddingChunks?: TableToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByOwnerTableId` relation. */ - tableTemplateModulesByOwnerTableId?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByOwnerTableId` exist. */ - tableTemplateModulesByOwnerTableIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefTableId` relation. */ + spatialRelationsByRefTableId?: TableToManySpatialRelationFilter; + /** `spatialRelationsByRefTableId` exist. */ + spatialRelationsByRefTableIdExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: TableToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: TableToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -6336,6 +6756,14 @@ export interface TableFilter { relationProvisionsByTargetTableId?: TableToManyRelationProvisionFilter; /** `relationProvisionsByTargetTableId` exist. */ relationProvisionsByTargetTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModulesBySessionsTableId` relation. */ + sessionSecretsModulesBySessionsTableId?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModulesBySessionsTableId` exist. */ + sessionSecretsModulesBySessionsTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } export interface CheckConstraintFilter { /** Filter by the object’s `id` field. */ @@ -6436,6 +6864,62 @@ export interface FieldFilter { database?: DatabaseFilter; /** Filter by the object’s `table` relation. */ table?: TableFilter; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: FieldToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefFieldId` relation. */ + spatialRelationsByRefFieldId?: FieldToManySpatialRelationFilter; + /** `spatialRelationsByRefFieldId` exist. */ + spatialRelationsByRefFieldIdExist?: boolean; +} +export interface SpatialRelationFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `refTableId` field. */ + refTableId?: UUIDFilter; + /** Filter by the object’s `refFieldId` field. */ + refFieldId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `operator` field. */ + operator?: StringFilter; + /** Filter by the object’s `paramName` field. */ + paramName?: StringFilter; + /** Filter by the object’s `category` field. */ + category?: ObjectCategoryFilter; + /** Filter by the object’s `module` field. */ + module?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: IntFilter; + /** Filter by the object’s `tags` field. */ + tags?: StringListFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: SpatialRelationFilter[]; + /** Checks for any expressions in this list. */ + or?: SpatialRelationFilter[]; + /** Negates the expression. */ + not?: SpatialRelationFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `field` relation. */ + field?: FieldFilter; + /** Filter by the object’s `refField` relation. */ + refField?: FieldFilter; + /** Filter by the object’s `refTable` relation. */ + refTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; } export interface ForeignKeyConstraintFilter { /** Filter by the object’s `id` field. */ @@ -6949,42 +7433,6 @@ export interface EmbeddingChunkFilter { /** Filter by the object’s `table` relation. */ table?: TableFilter; } -export interface TableTemplateModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `ownerTableId` field. */ - ownerTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; - /** Filter by the object’s `nodeType` field. */ - nodeType?: StringFilter; - /** Filter by the object’s `data` field. */ - data?: JSONFilter; - /** Checks for all expressions in this list. */ - and?: TableTemplateModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: TableTemplateModuleFilter[]; - /** Negates the expression. */ - not?: TableTemplateModuleFilter; - /** Filter by the object’s `database` relation. */ - database?: DatabaseFilter; - /** Filter by the object’s `ownerTable` relation. */ - ownerTable?: TableFilter; - /** Filter by the object’s `privateSchema` relation. */ - privateSchema?: SchemaFilter; - /** Filter by the object’s `schema` relation. */ - schema?: SchemaFilter; - /** Filter by the object’s `table` relation. */ - table?: TableFilter; -} export interface SecureTableProvisionFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -7107,6 +7555,34 @@ export interface RelationProvisionFilter { /** Filter by the object’s `targetTable` relation. */ targetTable?: TableFilter; } +export interface SessionSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: SessionSecretsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: SessionSecretsModuleFilter[]; + /** Negates the expression. */ + not?: SessionSecretsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `sessionsTable` relation. */ + sessionsTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} export interface SchemaGrantFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -8010,6 +8486,8 @@ export interface MembershipsModuleFilter { entityIdsByPerm?: StringFilter; /** Filter by the object’s `entityIdsFunction` field. */ entityIdsFunction?: StringFilter; + /** Filter by the object’s `memberProfilesTableId` field. */ + memberProfilesTableId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: MembershipsModuleFilter[]; /** Checks for any expressions in this list. */ @@ -8322,10 +8800,10 @@ export interface UserAuthModuleFilter { sendAccountDeletionEmailFunction?: StringFilter; /** Filter by the object’s `deleteAccountFunction` field. */ deleteAccountFunction?: StringFilter; - /** Filter by the object’s `signInOneTimeTokenFunction` field. */ - signInOneTimeTokenFunction?: StringFilter; - /** Filter by the object’s `oneTimeTokenFunction` field. */ - oneTimeTokenFunction?: StringFilter; + /** Filter by the object’s `signInCrossOriginFunction` field. */ + signInCrossOriginFunction?: StringFilter; + /** Filter by the object’s `requestCrossOriginTokenFunction` field. */ + requestCrossOriginTokenFunction?: StringFilter; /** Filter by the object’s `extendTokenExpires` field. */ extendTokenExpires?: StringFilter; /** Checks for all expressions in this list. */ @@ -8581,6 +9059,82 @@ export interface StorageModuleFilter { /** Filter by the object’s `uploadRequestsTable` relation. */ uploadRequestsTable?: TableFilter; } +export interface EntityTypeProvisionFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `parentEntity` field. */ + parentEntity?: StringFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `isVisible` field. */ + isVisible?: BooleanFilter; + /** Filter by the object’s `hasLimits` field. */ + hasLimits?: BooleanFilter; + /** Filter by the object’s `hasProfiles` field. */ + hasProfiles?: BooleanFilter; + /** Filter by the object’s `hasLevels` field. */ + hasLevels?: BooleanFilter; + /** Filter by the object’s `skipEntityPolicies` field. */ + skipEntityPolicies?: BooleanFilter; + /** Filter by the object’s `tableProvision` field. */ + tableProvision?: JSONFilter; + /** Filter by the object’s `outMembershipType` field. */ + outMembershipType?: IntFilter; + /** Filter by the object’s `outEntityTableId` field. */ + outEntityTableId?: UUIDFilter; + /** Filter by the object’s `outEntityTableName` field. */ + outEntityTableName?: StringFilter; + /** Filter by the object’s `outInstalledModules` field. */ + outInstalledModules?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: EntityTypeProvisionFilter[]; + /** Checks for any expressions in this list. */ + or?: EntityTypeProvisionFilter[]; + /** Negates the expression. */ + not?: EntityTypeProvisionFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; +} +export interface WebauthnCredentialsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: WebauthnCredentialsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: WebauthnCredentialsModuleFilter[]; + /** Negates the expression. */ + not?: WebauthnCredentialsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `ownerTable` relation. */ + ownerTable?: TableFilter; + /** Filter by the object’s `privateSchema` relation. */ + privateSchema?: SchemaFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} export interface DatabaseProvisionModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -8720,6 +9274,8 @@ export interface OrgMembershipFilter { isDisabled?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -8732,6 +9288,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ @@ -8744,6 +9302,10 @@ export interface OrgMembershipFilter { actor?: UserFilter; /** Filter by the object’s `entity` relation. */ entity?: UserFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; } export interface OrgMemberFilter { /** Filter by the object’s `id` field. */ @@ -8825,6 +9387,42 @@ export interface OrgOwnerGrantFilter { /** A related `grantor` exists. */ grantorExists?: boolean; } +export interface OrgMemberProfileFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Filter by the object’s `actor` relation. */ + actor?: UserFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; +} export interface OrgGrantFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -9131,32 +9729,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} export interface AppInviteFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -9417,21 +9989,59 @@ export interface OrgLimitDefaultFilter { /** Negates the expression. */ not?: OrgLimitDefaultFilter; } -export interface MembershipTypeFilter { +export interface DevicesModuleFilter { /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `userDevicesTableId` field. */ + userDevicesTableId?: UUIDFilter; + /** Filter by the object’s `deviceSettingsTableId` field. */ + deviceSettingsTableId?: UUIDFilter; + /** Filter by the object’s `userDevicesTable` field. */ + userDevicesTable?: StringFilter; + /** Filter by the object’s `deviceSettingsTable` field. */ + deviceSettingsTable?: StringFilter; /** Checks for all expressions in this list. */ - and?: MembershipTypeFilter[]; + and?: DevicesModuleFilter[]; /** Checks for any expressions in this list. */ - or?: MembershipTypeFilter[]; + or?: DevicesModuleFilter[]; /** Negates the expression. */ - not?: MembershipTypeFilter; + not?: DevicesModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `deviceSettingsTableByDeviceSettingsTableId` relation. */ + deviceSettingsTableByDeviceSettingsTableId?: TableFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `userDevicesTableByUserDevicesTableId` relation. */ + userDevicesTableByUserDevicesTableId?: TableFilter; +} +export interface UserConnectedAccountFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `service` field. */ + service?: StringFilter; + /** Filter by the object’s `identifier` field. */ + identifier?: StringFilter; + /** Filter by the object’s `details` field. */ + details?: JSONFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: UserConnectedAccountFilter[]; + /** Checks for any expressions in this list. */ + or?: UserConnectedAccountFilter[]; + /** Negates the expression. */ + not?: UserConnectedAccountFilter; } export interface AppMembershipDefaultFilter { /** Filter by the object’s `id` field. */ @@ -9517,6 +10127,26 @@ export interface RateLimitsModuleFilter { /** Filter by the object’s `schema` relation. */ schema?: SchemaFilter; } +export interface MembershipTypeFilter { + /** Filter by the object’s `id` field. */ + id?: IntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `parentMembershipType` field. */ + parentMembershipType?: IntFilter; + /** Filter by the object’s `hasUsersTableEntry` field. */ + hasUsersTableEntry?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: MembershipTypeFilter[]; + /** Checks for any expressions in this list. */ + or?: MembershipTypeFilter[]; + /** Negates the expression. */ + not?: MembershipTypeFilter; +} export interface OrgMembershipDefaultFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -9720,6 +10350,14 @@ export interface UserFilter { orgOwnerGrantsByGrantorId?: UserToManyOrgOwnerGrantFilter; /** `orgOwnerGrantsByGrantorId` exist. */ orgOwnerGrantsByGrantorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByActorId` relation. */ + orgMemberProfilesByActorId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByActorId` exist. */ + orgMemberProfilesByActorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByEntityId` relation. */ + orgMemberProfilesByEntityId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByEntityId` exist. */ + orgMemberProfilesByEntityIdExist?: boolean; /** Filter by the object’s `orgGrantsByActorId` relation. */ orgGrantsByActorId?: UserToManyOrgGrantFilter; /** `orgGrantsByActorId` exist. */ @@ -9800,10 +10438,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `appInvitesBySenderId` relation. */ appInvitesBySenderId?: UserToManyAppInviteFilter; /** `appInvitesBySenderId` exist. */ @@ -9911,6 +10545,8 @@ export interface AppMembershipFilter { isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -10265,6 +10901,40 @@ export type FieldOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type SpatialRelationOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'FIELD_ID_ASC' + | 'FIELD_ID_DESC' + | 'REF_TABLE_ID_ASC' + | 'REF_TABLE_ID_DESC' + | 'REF_FIELD_ID_ASC' + | 'REF_FIELD_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'OPERATOR_ASC' + | 'OPERATOR_DESC' + | 'PARAM_NAME_ASC' + | 'PARAM_NAME_DESC' + | 'CATEGORY_ASC' + | 'CATEGORY_DESC' + | 'MODULE_ASC' + | 'MODULE_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'TAGS_ASC' + | 'TAGS_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type ForeignKeyConstraintOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -10643,28 +11313,6 @@ export type EmbeddingChunkOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type TableTemplateModuleOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'OWNER_TABLE_ID_ASC' - | 'OWNER_TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC' - | 'NODE_TYPE_ASC' - | 'NODE_TYPE_DESC' - | 'DATA_ASC' - | 'DATA_DESC'; export type SecureTableProvisionOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -10767,6 +11415,22 @@ export type RelationProvisionOrderBy = | 'OUT_SOURCE_FIELD_ID_DESC' | 'OUT_TARGET_FIELD_ID_ASC' | 'OUT_TARGET_FIELD_ID_DESC'; +export type SessionSecretsModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'SESSIONS_TABLE_ID_ASC' + | 'SESSIONS_TABLE_ID_DESC'; export type SchemaGrantOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -11368,7 +12032,9 @@ export type MembershipsModuleOrderBy = | 'ENTITY_IDS_BY_PERM_ASC' | 'ENTITY_IDS_BY_PERM_DESC' | 'ENTITY_IDS_FUNCTION_ASC' - | 'ENTITY_IDS_FUNCTION_DESC'; + | 'ENTITY_IDS_FUNCTION_DESC' + | 'MEMBER_PROFILES_TABLE_ID_ASC' + | 'MEMBER_PROFILES_TABLE_ID_DESC'; export type PermissionsModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -11555,10 +12221,10 @@ export type UserAuthModuleOrderBy = | 'SEND_ACCOUNT_DELETION_EMAIL_FUNCTION_DESC' | 'DELETE_ACCOUNT_FUNCTION_ASC' | 'DELETE_ACCOUNT_FUNCTION_DESC' - | 'SIGN_IN_ONE_TIME_TOKEN_FUNCTION_ASC' - | 'SIGN_IN_ONE_TIME_TOKEN_FUNCTION_DESC' - | 'ONE_TIME_TOKEN_FUNCTION_ASC' - | 'ONE_TIME_TOKEN_FUNCTION_DESC' + | 'SIGN_IN_CROSS_ORIGIN_FUNCTION_ASC' + | 'SIGN_IN_CROSS_ORIGIN_FUNCTION_DESC' + | 'REQUEST_CROSS_ORIGIN_TOKEN_FUNCTION_ASC' + | 'REQUEST_CROSS_ORIGIN_TOKEN_FUNCTION_DESC' | 'EXTEND_TOKEN_EXPIRES_ASC' | 'EXTEND_TOKEN_EXPIRES_DESC'; export type UsersModuleOrderBy = @@ -11721,6 +12387,62 @@ export type StorageModuleOrderBy = | 'MAX_FILENAME_LENGTH_DESC' | 'CACHE_TTL_SECONDS_ASC' | 'CACHE_TTL_SECONDS_DESC'; +export type EntityTypeProvisionOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PARENT_ENTITY_ASC' + | 'PARENT_ENTITY_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'IS_VISIBLE_ASC' + | 'IS_VISIBLE_DESC' + | 'HAS_LIMITS_ASC' + | 'HAS_LIMITS_DESC' + | 'HAS_PROFILES_ASC' + | 'HAS_PROFILES_DESC' + | 'HAS_LEVELS_ASC' + | 'HAS_LEVELS_DESC' + | 'SKIP_ENTITY_POLICIES_ASC' + | 'SKIP_ENTITY_POLICIES_DESC' + | 'TABLE_PROVISION_ASC' + | 'TABLE_PROVISION_DESC' + | 'OUT_MEMBERSHIP_TYPE_ASC' + | 'OUT_MEMBERSHIP_TYPE_DESC' + | 'OUT_ENTITY_TABLE_ID_ASC' + | 'OUT_ENTITY_TABLE_ID_DESC' + | 'OUT_ENTITY_TABLE_NAME_ASC' + | 'OUT_ENTITY_TABLE_NAME_DESC' + | 'OUT_INSTALLED_MODULES_ASC' + | 'OUT_INSTALLED_MODULES_DESC'; +export type WebauthnCredentialsModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; export type DatabaseProvisionModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -11825,6 +12547,8 @@ export type OrgMembershipOrderBy = | 'IS_DISABLED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -11837,6 +12561,8 @@ export type OrgMembershipOrderBy = | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' | 'PROFILE_ID_ASC' | 'PROFILE_ID_DESC'; export type OrgMemberOrderBy = @@ -11887,6 +12613,32 @@ export type OrgOwnerGrantOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgMemberProfileOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'BIO_ASC' + | 'BIO_DESC' + | 'PROFILE_PICTURE_ASC' + | 'PROFILE_PICTURE_DESC'; export type OrgGrantOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12095,26 +12847,6 @@ export type CryptoAddressOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ConnectedAccountOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SERVICE_ASC' - | 'SERVICE_DESC' - | 'IDENTIFIER_ASC' - | 'IDENTIFIER_DESC' - | 'DETAILS_ASC' - | 'DETAILS_DESC' - | 'IS_VERIFIED_ASC' - | 'IS_VERIFIED_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type AppInviteOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12301,18 +13033,42 @@ export type OrgLimitDefaultOrderBy = | 'NAME_DESC' | 'MAX_ASC' | 'MAX_DESC'; -export type MembershipTypeOrderBy = +export type DevicesModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'DESCRIPTION_ASC' - | 'DESCRIPTION_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC'; + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'USER_DEVICES_TABLE_ID_ASC' + | 'USER_DEVICES_TABLE_ID_DESC' + | 'DEVICE_SETTINGS_TABLE_ID_ASC' + | 'DEVICE_SETTINGS_TABLE_ID_DESC' + | 'USER_DEVICES_TABLE_ASC' + | 'USER_DEVICES_TABLE_DESC' + | 'DEVICE_SETTINGS_TABLE_ASC' + | 'DEVICE_SETTINGS_TABLE_DESC'; +export type UserConnectedAccountOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SERVICE_ASC' + | 'SERVICE_DESC' + | 'IDENTIFIER_ASC' + | 'IDENTIFIER_DESC' + | 'DETAILS_ASC' + | 'DETAILS_DESC' + | 'IS_VERIFIED_ASC' + | 'IS_VERIFIED_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type AppMembershipDefaultOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12375,6 +13131,22 @@ export type RateLimitsModuleOrderBy = | 'IP_RATE_LIMITS_TABLE_DESC' | 'RATE_LIMITS_TABLE_ASC' | 'RATE_LIMITS_TABLE_DESC'; +export type MembershipTypeOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PARENT_MEMBERSHIP_TYPE_ASC' + | 'PARENT_MEMBERSHIP_TYPE_DESC' + | 'HAS_USERS_TABLE_ENTRY_ASC' + | 'HAS_USERS_TABLE_ENTRY_DESC'; export type OrgMembershipDefaultOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12529,6 +13301,8 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -12954,6 +13728,46 @@ export interface DeleteFieldInput { clientMutationId?: string; id: string; } +export interface CreateSpatialRelationInput { + clientMutationId?: string; + spatialRelation: { + databaseId?: string; + tableId: string; + fieldId: string; + refTableId: string; + refFieldId: string; + name: string; + operator: string; + paramName?: string; + category?: ObjectCategory; + module?: string; + scope?: number; + tags?: string[]; + }; +} +export interface SpatialRelationPatch { + databaseId?: string | null; + tableId?: string | null; + fieldId?: string | null; + refTableId?: string | null; + refFieldId?: string | null; + name?: string | null; + operator?: string | null; + paramName?: string | null; + category?: ObjectCategory | null; + module?: string | null; + scope?: number | null; + tags?: string[] | null; +} +export interface UpdateSpatialRelationInput { + clientMutationId?: string; + id: string; + spatialRelationPatch: SpatialRelationPatch; +} +export interface DeleteSpatialRelationInput { + clientMutationId?: string; + id: string; +} export interface CreateForeignKeyConstraintInput { clientMutationId?: string; foreignKeyConstraint: { @@ -13426,38 +14240,6 @@ export interface DeleteEmbeddingChunkInput { clientMutationId?: string; id: string; } -export interface CreateTableTemplateModuleInput { - clientMutationId?: string; - tableTemplateModule: { - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - tableId?: string; - ownerTableId?: string; - tableName: string; - nodeType: string; - data?: Record; - }; -} -export interface TableTemplateModulePatch { - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - tableId?: string | null; - ownerTableId?: string | null; - tableName?: string | null; - nodeType?: string | null; - data?: Record | null; -} -export interface UpdateTableTemplateModuleInput { - clientMutationId?: string; - id: string; - tableTemplateModulePatch: TableTemplateModulePatch; -} -export interface DeleteTableTemplateModuleInput { - clientMutationId?: string; - id: string; -} export interface CreateSecureTableProvisionInput { clientMutationId?: string; secureTableProvision: { @@ -13571,12 +14353,38 @@ export interface RelationProvisionPatch { outSourceFieldId?: string | null; outTargetFieldId?: string | null; } -export interface UpdateRelationProvisionInput { +export interface UpdateRelationProvisionInput { + clientMutationId?: string; + id: string; + relationProvisionPatch: RelationProvisionPatch; +} +export interface DeleteRelationProvisionInput { + clientMutationId?: string; + id: string; +} +export interface CreateSessionSecretsModuleInput { + clientMutationId?: string; + sessionSecretsModule: { + databaseId: string; + schemaId?: string; + tableId?: string; + tableName?: string; + sessionsTableId?: string; + }; +} +export interface SessionSecretsModulePatch { + databaseId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; + sessionsTableId?: string | null; +} +export interface UpdateSessionSecretsModuleInput { clientMutationId?: string; id: string; - relationProvisionPatch: RelationProvisionPatch; + sessionSecretsModulePatch: SessionSecretsModulePatch; } -export interface DeleteRelationProvisionInput { +export interface DeleteSessionSecretsModuleInput { clientMutationId?: string; id: string; } @@ -14393,6 +15201,7 @@ export interface CreateMembershipsModuleInput { entityIdsByMask?: string; entityIdsByPerm?: string; entityIdsFunction?: string; + memberProfilesTableId?: string; }; } export interface MembershipsModulePatch { @@ -14426,6 +15235,7 @@ export interface MembershipsModulePatch { entityIdsByMask?: string | null; entityIdsByPerm?: string | null; entityIdsFunction?: string | null; + memberProfilesTableId?: string | null; } export interface UpdateMembershipsModuleInput { clientMutationId?: string; @@ -14647,8 +15457,8 @@ export interface CreateUserAuthModuleInput { checkPasswordFunction?: string; sendAccountDeletionEmailFunction?: string; deleteAccountFunction?: string; - signInOneTimeTokenFunction?: string; - oneTimeTokenFunction?: string; + signInCrossOriginFunction?: string; + requestCrossOriginTokenFunction?: string; extendTokenExpires?: string; }; } @@ -14675,8 +15485,8 @@ export interface UserAuthModulePatch { checkPasswordFunction?: string | null; sendAccountDeletionEmailFunction?: string | null; deleteAccountFunction?: string | null; - signInOneTimeTokenFunction?: string | null; - oneTimeTokenFunction?: string | null; + signInCrossOriginFunction?: string | null; + requestCrossOriginTokenFunction?: string | null; extendTokenExpires?: string | null; } export interface UpdateUserAuthModuleInput { @@ -14886,6 +15696,82 @@ export interface DeleteStorageModuleInput { clientMutationId?: string; id: string; } +export interface CreateEntityTypeProvisionInput { + clientMutationId?: string; + entityTypeProvision: { + databaseId: string; + name: string; + prefix: string; + description?: string; + parentEntity?: string; + tableName?: string; + isVisible?: boolean; + hasLimits?: boolean; + hasProfiles?: boolean; + hasLevels?: boolean; + skipEntityPolicies?: boolean; + tableProvision?: Record; + outMembershipType?: number; + outEntityTableId?: string; + outEntityTableName?: string; + outInstalledModules?: string[]; + }; +} +export interface EntityTypeProvisionPatch { + databaseId?: string | null; + name?: string | null; + prefix?: string | null; + description?: string | null; + parentEntity?: string | null; + tableName?: string | null; + isVisible?: boolean | null; + hasLimits?: boolean | null; + hasProfiles?: boolean | null; + hasLevels?: boolean | null; + skipEntityPolicies?: boolean | null; + tableProvision?: Record | null; + outMembershipType?: number | null; + outEntityTableId?: string | null; + outEntityTableName?: string | null; + outInstalledModules?: string[] | null; +} +export interface UpdateEntityTypeProvisionInput { + clientMutationId?: string; + id: string; + entityTypeProvisionPatch: EntityTypeProvisionPatch; +} +export interface DeleteEntityTypeProvisionInput { + clientMutationId?: string; + id: string; +} +export interface CreateWebauthnCredentialsModuleInput { + clientMutationId?: string; + webauthnCredentialsModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + tableId?: string; + ownerTableId?: string; + tableName?: string; + }; +} +export interface WebauthnCredentialsModulePatch { + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + tableId?: string | null; + ownerTableId?: string | null; + tableName?: string | null; +} +export interface UpdateWebauthnCredentialsModuleInput { + clientMutationId?: string; + id: string; + webauthnCredentialsModulePatch: WebauthnCredentialsModulePatch; +} +export interface DeleteWebauthnCredentialsModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateDatabaseProvisionModuleInput { clientMutationId?: string; databaseProvisionModule: { @@ -15001,12 +15887,14 @@ export interface CreateOrgMembershipInput { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; granted?: string; actorId: string; entityId: string; + isReadOnly?: boolean; profileId?: string; }; } @@ -15017,12 +15905,14 @@ export interface OrgMembershipPatch { isBanned?: boolean | null; isDisabled?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; granted?: string | null; actorId?: string | null; entityId?: string | null; + isReadOnly?: boolean | null; profileId?: string | null; } export interface UpdateOrgMembershipInput { @@ -15104,6 +15994,39 @@ export interface DeleteOrgOwnerGrantInput { clientMutationId?: string; id: string; } +export interface CreateOrgMemberProfileInput { + clientMutationId?: string; + orgMemberProfile: { + membershipId: string; + entityId: string; + actorId: string; + displayName?: string; + email?: string; + title?: string; + bio?: string; + profilePicture?: ConstructiveInternalTypeImage; + }; +} +export interface OrgMemberProfilePatch { + membershipId?: string | null; + entityId?: string | null; + actorId?: string | null; + displayName?: string | null; + email?: string | null; + title?: string | null; + bio?: string | null; + profilePicture?: ConstructiveInternalTypeImage | null; + profilePictureUpload?: File | null; +} +export interface UpdateOrgMemberProfileInput { + clientMutationId?: string; + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; +} +export interface DeleteOrgMemberProfileInput { + clientMutationId?: string; + id: string; +} export interface CreateOrgGrantInput { clientMutationId?: string; orgGrant: { @@ -15399,32 +16322,6 @@ export interface DeleteCryptoAddressInput { clientMutationId?: string; id: string; } -export interface CreateConnectedAccountInput { - clientMutationId?: string; - connectedAccount: { - ownerId?: string; - service: string; - identifier: string; - details: Record; - isVerified?: boolean; - }; -} -export interface ConnectedAccountPatch { - ownerId?: string | null; - service?: string | null; - identifier?: string | null; - details?: Record | null; - isVerified?: boolean | null; -} -export interface UpdateConnectedAccountInput { - clientMutationId?: string; - id: string; - connectedAccountPatch: ConnectedAccountPatch; -} -export interface DeleteConnectedAccountInput { - clientMutationId?: string; - id: string; -} export interface CreateAppInviteInput { clientMutationId?: string; appInvite: { @@ -15713,27 +16610,59 @@ export interface DeleteOrgLimitDefaultInput { clientMutationId?: string; id: string; } -export interface CreateMembershipTypeInput { +export interface CreateDevicesModuleInput { clientMutationId?: string; - membershipType: { - name: string; - description: string; - prefix: string; + devicesModule: { + databaseId: string; + schemaId?: string; + userDevicesTableId?: string; + deviceSettingsTableId?: string; + userDevicesTable?: string; + deviceSettingsTable?: string; }; } -export interface MembershipTypePatch { - name?: string | null; - description?: string | null; - prefix?: string | null; +export interface DevicesModulePatch { + databaseId?: string | null; + schemaId?: string | null; + userDevicesTableId?: string | null; + deviceSettingsTableId?: string | null; + userDevicesTable?: string | null; + deviceSettingsTable?: string | null; } -export interface UpdateMembershipTypeInput { +export interface UpdateDevicesModuleInput { clientMutationId?: string; - id: number; - membershipTypePatch: MembershipTypePatch; + id: string; + devicesModulePatch: DevicesModulePatch; } -export interface DeleteMembershipTypeInput { +export interface DeleteDevicesModuleInput { clientMutationId?: string; - id: number; + id: string; +} +export interface CreateUserConnectedAccountInput { + clientMutationId?: string; + userConnectedAccount: { + ownerId?: string; + service?: string; + identifier?: string; + details?: Record; + isVerified?: boolean; + }; +} +export interface UserConnectedAccountPatch { + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; +} +export interface UpdateUserConnectedAccountInput { + clientMutationId?: string; + id: string; + userConnectedAccountPatch: UserConnectedAccountPatch; +} +export interface DeleteUserConnectedAccountInput { + clientMutationId?: string; + id: string; } export interface CreateAppMembershipDefaultInput { clientMutationId?: string; @@ -15823,6 +16752,32 @@ export interface DeleteRateLimitsModuleInput { clientMutationId?: string; id: string; } +export interface CreateMembershipTypeInput { + clientMutationId?: string; + membershipType: { + name: string; + description: string; + prefix: string; + parentMembershipType?: number; + hasUsersTableEntry?: boolean; + }; +} +export interface MembershipTypePatch { + name?: string | null; + description?: string | null; + prefix?: string | null; + parentMembershipType?: number | null; + hasUsersTableEntry?: boolean | null; +} +export interface UpdateMembershipTypeInput { + clientMutationId?: string; + id: number; + membershipTypePatch: MembershipTypePatch; +} +export interface DeleteMembershipTypeInput { + clientMutationId?: string; + id: number; +} export interface CreateOrgMembershipDefaultInput { clientMutationId?: string; orgMembershipDefault: { @@ -15998,6 +16953,7 @@ export interface CreateAppMembershipInput { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; @@ -16014,6 +16970,7 @@ export interface AppMembershipPatch { isDisabled?: boolean | null; isVerified?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; @@ -16105,6 +17062,7 @@ export const connectionFieldsMap = { defaultPrivileges: 'DefaultPrivilege', enums: 'Enum', embeddingChunks: 'EmbeddingChunk', + spatialRelations: 'SpatialRelation', databaseTransfers: 'DatabaseTransfer', apis: 'Api', apiModules: 'ApiModule', @@ -16134,12 +17092,14 @@ export const connectionFieldsMap = { sessionsModules: 'SessionsModule', userAuthModules: 'UserAuthModule', usersModules: 'UsersModule', - tableTemplateModules: 'TableTemplateModule', secureTableProvisions: 'SecureTableProvision', relationProvisions: 'RelationProvision', blueprints: 'Blueprint', blueprintConstructions: 'BlueprintConstruction', storageModules: 'StorageModule', + entityTypeProvisions: 'EntityTypeProvision', + sessionSecretsModules: 'SessionSecretsModule', + webauthnCredentialsModules: 'WebauthnCredentialsModule', databaseProvisionModules: 'DatabaseProvisionModule', }, Schema: { @@ -16149,8 +17109,7 @@ export const connectionFieldsMap = { defaultPrivileges: 'DefaultPrivilege', enums: 'Enum', apiSchemas: 'ApiSchema', - tableTemplateModulesByPrivateSchemaId: 'TableTemplateModule', - tableTemplateModules: 'TableTemplateModule', + sessionSecretsModules: 'SessionSecretsModule', }, Table: { checkConstraints: 'CheckConstraint', @@ -16167,11 +17126,17 @@ export const connectionFieldsMap = { viewTables: 'ViewTable', embeddingChunksByChunksTableId: 'EmbeddingChunk', embeddingChunks: 'EmbeddingChunk', - tableTemplateModulesByOwnerTableId: 'TableTemplateModule', - tableTemplateModules: 'TableTemplateModule', + spatialRelationsByRefTableId: 'SpatialRelation', + spatialRelations: 'SpatialRelation', secureTableProvisions: 'SecureTableProvision', relationProvisionsBySourceTableId: 'RelationProvision', relationProvisionsByTargetTableId: 'RelationProvision', + sessionSecretsModulesBySessionsTableId: 'SessionSecretsModule', + sessionSecretsModules: 'SessionSecretsModule', + }, + Field: { + spatialRelations: 'SpatialRelation', + spatialRelationsByRefFieldId: 'SpatialRelation', }, View: { viewTables: 'ViewTable', @@ -16214,6 +17179,8 @@ export const connectionFieldsMap = { orgOwnerGrantsByActorId: 'OrgOwnerGrant', orgOwnerGrantsByEntityId: 'OrgOwnerGrant', orgOwnerGrantsByGrantorId: 'OrgOwnerGrant', + orgMemberProfilesByActorId: 'OrgMemberProfile', + orgMemberProfilesByEntityId: 'OrgMemberProfile', orgGrantsByActorId: 'OrgGrant', orgGrantsByEntityId: 'OrgGrant', orgGrantsByGrantorId: 'OrgGrant', @@ -16234,7 +17201,6 @@ export const connectionFieldsMap = { ownedEmails: 'Email', ownedPhoneNumbers: 'PhoneNumber', ownedCryptoAddresses: 'CryptoAddress', - ownedConnectedAccounts: 'ConnectedAccount', appInvitesBySenderId: 'AppInvite', appClaimedInvitesByReceiverId: 'AppClaimedInvite', appClaimedInvitesBySenderId: 'AppClaimedInvite', @@ -16266,6 +17232,18 @@ export interface RejectDatabaseTransferInput { clientMutationId?: string; transferId?: string; } +export interface DisconnectAccountInput { + clientMutationId?: string; + accountId: string; +} +export interface RevokeApiKeyInput { + clientMutationId?: string; + keyId: string; +} +export interface RevokeSessionInput { + clientMutationId?: string; + sessionId: string; +} export interface VerifyPasswordInput { clientMutationId?: string; password: string; @@ -16316,6 +17294,11 @@ export interface ConstructBlueprintInput { blueprintId?: string; schemaId?: string; } +export interface ProvisionNewUserInput { + clientMutationId?: string; + email?: string; + password?: string; +} export interface ResetPasswordInput { clientMutationId?: string; roleId?: string; @@ -16336,6 +17319,23 @@ export interface CopyTemplateToBlueprintInput { nameOverride?: string; displayNameOverride?: string; } +export interface CreateApiKeyInput { + clientMutationId?: string; + keyName: string; + accessLevel?: string; + mfaLevel?: string; +} +export interface ProvisionSpatialRelationInput { + clientMutationId?: string; + pDatabaseId?: string; + pSourceTableId?: string; + pSourceFieldId?: string; + pTargetTableId?: string; + pTargetFieldId?: string; + pName?: string; + pOperator?: string; + pParamName?: string; +} export interface BootstrapUserInput { clientMutationId?: string; targetDatabaseId?: string; @@ -16452,7 +17452,7 @@ export interface ApplyRlsInput { permissive?: boolean; name?: string; } -export interface SignInOneTimeTokenInput { +export interface SignInCrossOriginInput { clientMutationId?: string; token?: string; credentialKind?: string; @@ -16471,7 +17471,7 @@ export interface ExtendTokenExpiresInput { clientMutationId?: string; amount?: IntervalInput; } -export interface SignInInput { +export interface SignUpInput { clientMutationId?: string; email?: string; password?: string; @@ -16479,20 +17479,21 @@ export interface SignInInput { credentialKind?: string; csrfToken?: string; } -export interface SignUpInput { +export interface RequestCrossOriginTokenInput { clientMutationId?: string; email?: string; password?: string; + origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; - credentialKind?: string; - csrfToken?: string; } -export interface OneTimeTokenInput { +export interface SignInInput { clientMutationId?: string; email?: string; password?: string; - origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; + credentialKind?: string; + csrfToken?: string; + deviceToken?: string; } export interface ProvisionTableInput { clientMutationId?: string; @@ -16718,6 +17719,15 @@ export interface DatabaseToManyEmbeddingChunkFilter { /** Filters to entities where no related entity matches. */ none?: EmbeddingChunkFilter; } +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManySpatialRelationFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SpatialRelationFilter; + /** Filters to entities where every related entity matches. */ + every?: SpatialRelationFilter; + /** Filters to entities where no related entity matches. */ + none?: SpatialRelationFilter; +} /** A filter to be used against many `DatabaseTransfer` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManyDatabaseTransferFilter { /** Filters to entities where at least one related entity matches. */ @@ -16979,15 +17989,6 @@ export interface DatabaseToManyUsersModuleFilter { /** Filters to entities where no related entity matches. */ none?: UsersModuleFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface DatabaseToManyTableTemplateModuleFilter { - /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; - /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; - /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; -} /** A filter to be used against many `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManySecureTableProvisionFilter { /** Filters to entities where at least one related entity matches. */ @@ -17033,6 +18034,33 @@ export interface DatabaseToManyStorageModuleFilter { /** Filters to entities where no related entity matches. */ none?: StorageModuleFilter; } +/** A filter to be used against many `EntityTypeProvision` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManyEntityTypeProvisionFilter { + /** Filters to entities where at least one related entity matches. */ + some?: EntityTypeProvisionFilter; + /** Filters to entities where every related entity matches. */ + every?: EntityTypeProvisionFilter; + /** Filters to entities where no related entity matches. */ + none?: EntityTypeProvisionFilter; +} +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManySessionSecretsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SessionSecretsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: SessionSecretsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: SessionSecretsModuleFilter; +} +/** A filter to be used against many `WebauthnCredentialsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManyWebauthnCredentialsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: WebauthnCredentialsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: WebauthnCredentialsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: WebauthnCredentialsModuleFilter; +} /** A filter to be used against many `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManyDatabaseProvisionModuleFilter { /** Filters to entities where at least one related entity matches. */ @@ -17121,14 +18149,14 @@ export interface SchemaToManyApiSchemaFilter { /** Filters to entities where no related entity matches. */ none?: ApiSchemaFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface SchemaToManyTableTemplateModuleFilter { +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SchemaToManySessionSecretsModuleFilter { /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; + some?: SessionSecretsModuleFilter; /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; + every?: SessionSecretsModuleFilter; /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; + none?: SessionSecretsModuleFilter; } /** A filter to be used against many `CheckConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface TableToManyCheckConstraintFilter { @@ -17247,14 +18275,14 @@ export interface TableToManyEmbeddingChunkFilter { /** Filters to entities where no related entity matches. */ none?: EmbeddingChunkFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface TableToManyTableTemplateModuleFilter { +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface TableToManySpatialRelationFilter { /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; + some?: SpatialRelationFilter; /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; + every?: SpatialRelationFilter; /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; + none?: SpatialRelationFilter; } /** A filter to be used against many `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface TableToManySecureTableProvisionFilter { @@ -17274,6 +18302,24 @@ export interface TableToManyRelationProvisionFilter { /** Filters to entities where no related entity matches. */ none?: RelationProvisionFilter; } +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface TableToManySessionSecretsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SessionSecretsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: SessionSecretsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: SessionSecretsModuleFilter; +} +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface FieldToManySpatialRelationFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SpatialRelationFilter; + /** Filters to entities where every related entity matches. */ + every?: SpatialRelationFilter; + /** Filters to entities where no related entity matches. */ + none?: SpatialRelationFilter; +} /** A filter to be used against many `ViewTable` object types. All fields are combined with a logical ‘and.’ */ export interface ViewToManyViewTableFilter { /** Filters to entities where at least one related entity matches. */ @@ -18063,6 +19109,15 @@ export interface UserToManyOrgOwnerGrantFilter { /** Filters to entities where no related entity matches. */ none?: OrgOwnerGrantFilter; } +/** A filter to be used against many `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyOrgMemberProfileFilter { + /** Filters to entities where at least one related entity matches. */ + some?: OrgMemberProfileFilter; + /** Filters to entities where every related entity matches. */ + every?: OrgMemberProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgMemberProfileFilter; +} /** A filter to be used against many `OrgGrant` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyOrgGrantFilter { /** Filters to entities where at least one related entity matches. */ @@ -18171,15 +19226,6 @@ export interface UserToManyCryptoAddressFilter { /** Filters to entities where no related entity matches. */ none?: CryptoAddressFilter; } -/** A filter to be used against many `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface UserToManyConnectedAccountFilter { - /** Filters to entities where at least one related entity matches. */ - some?: ConnectedAccountFilter; - /** Filters to entities where every related entity matches. */ - every?: ConnectedAccountFilter; - /** Filters to entities where no related entity matches. */ - none?: ConnectedAccountFilter; -} /** A filter to be used against many `AppInvite` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyAppInviteFilter { /** Filters to entities where at least one related entity matches. */ @@ -18313,14 +19359,10 @@ export interface SchemaFilter { apiSchemas?: SchemaToManyApiSchemaFilter; /** `apiSchemas` exist. */ apiSchemasExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByPrivateSchemaId` relation. */ - tableTemplateModulesByPrivateSchemaId?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByPrivateSchemaId` exist. */ - tableTemplateModulesByPrivateSchemaIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: SchemaToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } /** A filter to be used against `Table` object types. All fields are combined with a logical ‘and.’ */ export interface TableFilter { @@ -18432,14 +19474,14 @@ export interface TableFilter { embeddingChunks?: TableToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByOwnerTableId` relation. */ - tableTemplateModulesByOwnerTableId?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByOwnerTableId` exist. */ - tableTemplateModulesByOwnerTableIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefTableId` relation. */ + spatialRelationsByRefTableId?: TableToManySpatialRelationFilter; + /** `spatialRelationsByRefTableId` exist. */ + spatialRelationsByRefTableIdExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: TableToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: TableToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -18452,6 +19494,14 @@ export interface TableFilter { relationProvisionsByTargetTableId?: TableToManyRelationProvisionFilter; /** `relationProvisionsByTargetTableId` exist. */ relationProvisionsByTargetTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModulesBySessionsTableId` relation. */ + sessionSecretsModulesBySessionsTableId?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModulesBySessionsTableId` exist. */ + sessionSecretsModulesBySessionsTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } /** A filter to be used against `CheckConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface CheckConstraintFilter { @@ -18554,6 +19604,14 @@ export interface FieldFilter { database?: DatabaseFilter; /** Filter by the object’s `table` relation. */ table?: TableFilter; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: FieldToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefFieldId` relation. */ + spatialRelationsByRefFieldId?: FieldToManySpatialRelationFilter; + /** `spatialRelationsByRefFieldId` exist. */ + spatialRelationsByRefFieldIdExist?: boolean; } /** A filter to be used against `ForeignKeyConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface ForeignKeyConstraintFilter { @@ -19151,23 +20209,72 @@ export interface EmbeddingChunkFilter { /** Checks for all expressions in this list. */ and?: EmbeddingChunkFilter[]; /** Checks for any expressions in this list. */ - or?: EmbeddingChunkFilter[]; + or?: EmbeddingChunkFilter[]; + /** Negates the expression. */ + not?: EmbeddingChunkFilter; + /** Filter by the object’s `chunksTable` relation. */ + chunksTable?: TableFilter; + /** A related `chunksTable` exists. */ + chunksTableExists?: boolean; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `embeddingField` relation. */ + embeddingField?: FieldFilter; + /** A related `embeddingField` exists. */ + embeddingFieldExists?: boolean; + /** Filter by the object’s `parentFkField` relation. */ + parentFkField?: FieldFilter; + /** A related `parentFkField` exists. */ + parentFkFieldExists?: boolean; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} +/** A filter to be used against `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface SpatialRelationFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `refTableId` field. */ + refTableId?: UUIDFilter; + /** Filter by the object’s `refFieldId` field. */ + refFieldId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `operator` field. */ + operator?: StringFilter; + /** Filter by the object’s `paramName` field. */ + paramName?: StringFilter; + /** Filter by the object’s `category` field. */ + category?: ObjectCategoryFilter; + /** Filter by the object’s `module` field. */ + module?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: IntFilter; + /** Filter by the object’s `tags` field. */ + tags?: StringListFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: SpatialRelationFilter[]; + /** Checks for any expressions in this list. */ + or?: SpatialRelationFilter[]; /** Negates the expression. */ - not?: EmbeddingChunkFilter; - /** Filter by the object’s `chunksTable` relation. */ - chunksTable?: TableFilter; - /** A related `chunksTable` exists. */ - chunksTableExists?: boolean; + not?: SpatialRelationFilter; /** Filter by the object’s `database` relation. */ database?: DatabaseFilter; - /** Filter by the object’s `embeddingField` relation. */ - embeddingField?: FieldFilter; - /** A related `embeddingField` exists. */ - embeddingFieldExists?: boolean; - /** Filter by the object’s `parentFkField` relation. */ - parentFkField?: FieldFilter; - /** A related `parentFkField` exists. */ - parentFkFieldExists?: boolean; + /** Filter by the object’s `field` relation. */ + field?: FieldFilter; + /** Filter by the object’s `refField` relation. */ + refField?: FieldFilter; + /** Filter by the object’s `refTable` relation. */ + refTable?: TableFilter; /** Filter by the object’s `table` relation. */ table?: TableFilter; } @@ -19988,6 +21095,8 @@ export interface MembershipsModuleFilter { entityIdsByPerm?: StringFilter; /** Filter by the object’s `entityIdsFunction` field. */ entityIdsFunction?: StringFilter; + /** Filter by the object’s `memberProfilesTableId` field. */ + memberProfilesTableId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: MembershipsModuleFilter[]; /** Checks for any expressions in this list. */ @@ -20306,10 +21415,10 @@ export interface UserAuthModuleFilter { sendAccountDeletionEmailFunction?: StringFilter; /** Filter by the object’s `deleteAccountFunction` field. */ deleteAccountFunction?: StringFilter; - /** Filter by the object’s `signInOneTimeTokenFunction` field. */ - signInOneTimeTokenFunction?: StringFilter; - /** Filter by the object’s `oneTimeTokenFunction` field. */ - oneTimeTokenFunction?: StringFilter; + /** Filter by the object’s `signInCrossOriginFunction` field. */ + signInCrossOriginFunction?: StringFilter; + /** Filter by the object’s `requestCrossOriginTokenFunction` field. */ + requestCrossOriginTokenFunction?: StringFilter; /** Filter by the object’s `extendTokenExpires` field. */ extendTokenExpires?: StringFilter; /** Checks for all expressions in this list. */ @@ -20366,43 +21475,6 @@ export interface UsersModuleFilter { /** Filter by the object’s `typeTable` relation. */ typeTable?: TableFilter; } -/** A filter to be used against `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface TableTemplateModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `ownerTableId` field. */ - ownerTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; - /** Filter by the object’s `nodeType` field. */ - nodeType?: StringFilter; - /** Filter by the object’s `data` field. */ - data?: JSONFilter; - /** Checks for all expressions in this list. */ - and?: TableTemplateModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: TableTemplateModuleFilter[]; - /** Negates the expression. */ - not?: TableTemplateModuleFilter; - /** Filter by the object’s `database` relation. */ - database?: DatabaseFilter; - /** Filter by the object’s `ownerTable` relation. */ - ownerTable?: TableFilter; - /** Filter by the object’s `privateSchema` relation. */ - privateSchema?: SchemaFilter; - /** Filter by the object’s `schema` relation. */ - schema?: SchemaFilter; - /** Filter by the object’s `table` relation. */ - table?: TableFilter; -} /** A filter to be used against `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface SecureTableProvisionFilter { /** Filter by the object’s `id` field. */ @@ -20670,6 +21742,113 @@ export interface StorageModuleFilter { /** Filter by the object’s `uploadRequestsTable` relation. */ uploadRequestsTable?: TableFilter; } +/** A filter to be used against `EntityTypeProvision` object types. All fields are combined with a logical ‘and.’ */ +export interface EntityTypeProvisionFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `parentEntity` field. */ + parentEntity?: StringFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `isVisible` field. */ + isVisible?: BooleanFilter; + /** Filter by the object’s `hasLimits` field. */ + hasLimits?: BooleanFilter; + /** Filter by the object’s `hasProfiles` field. */ + hasProfiles?: BooleanFilter; + /** Filter by the object’s `hasLevels` field. */ + hasLevels?: BooleanFilter; + /** Filter by the object’s `skipEntityPolicies` field. */ + skipEntityPolicies?: BooleanFilter; + /** Filter by the object’s `tableProvision` field. */ + tableProvision?: JSONFilter; + /** Filter by the object’s `outMembershipType` field. */ + outMembershipType?: IntFilter; + /** Filter by the object’s `outEntityTableId` field. */ + outEntityTableId?: UUIDFilter; + /** Filter by the object’s `outEntityTableName` field. */ + outEntityTableName?: StringFilter; + /** Filter by the object’s `outInstalledModules` field. */ + outInstalledModules?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: EntityTypeProvisionFilter[]; + /** Checks for any expressions in this list. */ + or?: EntityTypeProvisionFilter[]; + /** Negates the expression. */ + not?: EntityTypeProvisionFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; +} +/** A filter to be used against `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SessionSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: SessionSecretsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: SessionSecretsModuleFilter[]; + /** Negates the expression. */ + not?: SessionSecretsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `sessionsTable` relation. */ + sessionsTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} +/** A filter to be used against `WebauthnCredentialsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface WebauthnCredentialsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: WebauthnCredentialsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: WebauthnCredentialsModuleFilter[]; + /** Negates the expression. */ + not?: WebauthnCredentialsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `ownerTable` relation. */ + ownerTable?: TableFilter; + /** Filter by the object’s `privateSchema` relation. */ + privateSchema?: SchemaFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} /** A filter to be used against `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseProvisionModuleFilter { /** Filter by the object’s `id` field. */ @@ -20901,6 +22080,10 @@ export interface DatabaseFilter { embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: DatabaseToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `databaseTransfers` relation. */ databaseTransfers?: DatabaseToManyDatabaseTransferFilter; /** `databaseTransfers` exist. */ @@ -21025,10 +22208,6 @@ export interface DatabaseFilter { hierarchyModule?: HierarchyModuleFilter; /** A related `hierarchyModule` exists. */ hierarchyModuleExists?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: DatabaseToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: DatabaseToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -21049,10 +22228,26 @@ export interface DatabaseFilter { storageModules?: DatabaseToManyStorageModuleFilter; /** `storageModules` exist. */ storageModulesExist?: boolean; + /** Filter by the object’s `entityTypeProvisions` relation. */ + entityTypeProvisions?: DatabaseToManyEntityTypeProvisionFilter; + /** `entityTypeProvisions` exist. */ + entityTypeProvisionsExist?: boolean; /** Filter by the object’s `rateLimitsModule` relation. */ rateLimitsModule?: RateLimitsModuleFilter; /** A related `rateLimitsModule` exists. */ rateLimitsModuleExists?: boolean; + /** Filter by the object’s `devicesModule` relation. */ + devicesModule?: DevicesModuleFilter; + /** A related `devicesModule` exists. */ + devicesModuleExists?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: DatabaseToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; + /** Filter by the object’s `webauthnCredentialsModules` relation. */ + webauthnCredentialsModules?: DatabaseToManyWebauthnCredentialsModuleFilter; + /** `webauthnCredentialsModules` exist. */ + webauthnCredentialsModulesExist?: boolean; /** Filter by the object’s `databaseProvisionModules` relation. */ databaseProvisionModules?: DatabaseToManyDatabaseProvisionModuleFilter; /** `databaseProvisionModules` exist. */ @@ -21161,6 +22356,8 @@ export interface OrgMembershipFilter { isDisabled?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -21173,6 +22370,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ @@ -21185,6 +22384,10 @@ export interface OrgMembershipFilter { actor?: UserFilter; /** Filter by the object’s `entity` relation. */ entity?: UserFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; } /** A filter to be used against `OrgMember` object types. All fields are combined with a logical ‘and.’ */ export interface OrgMemberFilter { @@ -21269,6 +22472,43 @@ export interface OrgOwnerGrantFilter { /** A related `grantor` exists. */ grantorExists?: boolean; } +/** A filter to be used against `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMemberProfileFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Filter by the object’s `actor` relation. */ + actor?: UserFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; +} /** A filter to be used against `OrgGrant` object types. All fields are combined with a logical ‘and.’ */ export interface OrgGrantFilter { /** Filter by the object’s `id` field. */ @@ -21587,33 +22827,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -/** A filter to be used against `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} /** A filter to be used against `AppInvite` object types. All fields are combined with a logical ‘and.’ */ export interface AppInviteFilter { /** Filter by the object’s `id` field. */ @@ -22219,6 +23432,14 @@ export interface UserFilter { orgOwnerGrantsByGrantorId?: UserToManyOrgOwnerGrantFilter; /** `orgOwnerGrantsByGrantorId` exist. */ orgOwnerGrantsByGrantorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByActorId` relation. */ + orgMemberProfilesByActorId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByActorId` exist. */ + orgMemberProfilesByActorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByEntityId` relation. */ + orgMemberProfilesByEntityId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByEntityId` exist. */ + orgMemberProfilesByEntityIdExist?: boolean; /** Filter by the object’s `orgGrantsByActorId` relation. */ orgGrantsByActorId?: UserToManyOrgGrantFilter; /** `orgGrantsByActorId` exist. */ @@ -22299,10 +23520,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `appInvitesBySenderId` relation. */ appInvitesBySenderId?: UserToManyAppInviteFilter; /** `appInvitesBySenderId` exist. */ @@ -22500,6 +23717,37 @@ export interface RateLimitsModuleFilter { /** Filter by the object’s `schema` relation. */ schema?: SchemaFilter; } +/** A filter to be used against `DevicesModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DevicesModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `userDevicesTableId` field. */ + userDevicesTableId?: UUIDFilter; + /** Filter by the object’s `deviceSettingsTableId` field. */ + deviceSettingsTableId?: UUIDFilter; + /** Filter by the object’s `userDevicesTable` field. */ + userDevicesTable?: StringFilter; + /** Filter by the object’s `deviceSettingsTable` field. */ + deviceSettingsTable?: StringFilter; + /** Checks for all expressions in this list. */ + and?: DevicesModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: DevicesModuleFilter[]; + /** Negates the expression. */ + not?: DevicesModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `deviceSettingsTableByDeviceSettingsTableId` relation. */ + deviceSettingsTableByDeviceSettingsTableId?: TableFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `userDevicesTableByUserDevicesTableId` relation. */ + userDevicesTableByUserDevicesTableId?: TableFilter; +} /** A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ */ export interface BitStringFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -22614,6 +23862,8 @@ export interface AppMembershipFilter { isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -22779,6 +24029,30 @@ export type RejectDatabaseTransferPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface DisconnectAccountPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DisconnectAccountPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeSessionPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeSessionPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface VerifyPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -22861,6 +24135,14 @@ export type ConstructBlueprintPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface ProvisionNewUserPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type ProvisionNewUserPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ResetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -22885,6 +24167,24 @@ export type CopyTemplateToBlueprintPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface CreateApiKeyPayload { + clientMutationId?: string | null; + result?: CreateApiKeyRecord | null; +} +export type CreateApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: CreateApiKeyRecordSelect; + }; +}; +export interface ProvisionSpatialRelationPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type ProvisionSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface BootstrapUserPayload { clientMutationId?: string | null; result?: BootstrapUserRecord[] | null; @@ -22989,14 +24289,14 @@ export interface ApplyRlsPayload { export type ApplyRlsPayloadSelect = { clientMutationId?: boolean; }; -export interface SignInOneTimeTokenPayload { +export interface SignInCrossOriginPayload { clientMutationId?: string | null; - result?: SignInOneTimeTokenRecord | null; + result?: SignInCrossOriginRecord | null; } -export type SignInOneTimeTokenPayloadSelect = { +export type SignInCrossOriginPayloadSelect = { clientMutationId?: boolean; result?: { - select: SignInOneTimeTokenRecordSelect; + select: SignInCrossOriginRecordSelect; }; }; export interface CreateUserDatabasePayload { @@ -23017,16 +24317,6 @@ export type ExtendTokenExpiresPayloadSelect = { select: ExtendTokenExpiresRecordSelect; }; }; -export interface SignInPayload { - clientMutationId?: string | null; - result?: SignInRecord | null; -} -export type SignInPayloadSelect = { - clientMutationId?: boolean; - result?: { - select: SignInRecordSelect; - }; -}; export interface SignUpPayload { clientMutationId?: string | null; result?: SignUpRecord | null; @@ -23037,14 +24327,24 @@ export type SignUpPayloadSelect = { select: SignUpRecordSelect; }; }; -export interface OneTimeTokenPayload { +export interface RequestCrossOriginTokenPayload { clientMutationId?: string | null; result?: string | null; } -export type OneTimeTokenPayloadSelect = { +export type RequestCrossOriginTokenPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SignInPayload { + clientMutationId?: string | null; + result?: SignInRecord | null; +} +export type SignInPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: SignInRecordSelect; + }; +}; export interface ProvisionTablePayload { clientMutationId?: string | null; result?: ProvisionTableRecord[] | null; @@ -23528,6 +24828,51 @@ export type DeleteFieldPayloadSelect = { select: FieldEdgeSelect; }; }; +export interface CreateSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was created by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} +export type CreateSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + spatialRelation?: { + select: SpatialRelationSelect; + }; + spatialRelationEdge?: { + select: SpatialRelationEdgeSelect; + }; +}; +export interface UpdateSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was updated by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} +export type UpdateSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + spatialRelation?: { + select: SpatialRelationSelect; + }; + spatialRelationEdge?: { + select: SpatialRelationEdgeSelect; + }; +}; +export interface DeleteSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was deleted by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} +export type DeleteSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + spatialRelation?: { + select: SpatialRelationSelect; + }; + spatialRelationEdge?: { + select: SpatialRelationEdgeSelect; + }; +}; export interface CreateForeignKeyConstraintPayload { clientMutationId?: string | null; /** The `ForeignKeyConstraint` that was created by this mutation. */ @@ -24113,51 +25458,6 @@ export type DeleteEmbeddingChunkPayloadSelect = { select: EmbeddingChunkEdgeSelect; }; }; -export interface CreateTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was created by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} -export type CreateTableTemplateModulePayloadSelect = { - clientMutationId?: boolean; - tableTemplateModule?: { - select: TableTemplateModuleSelect; - }; - tableTemplateModuleEdge?: { - select: TableTemplateModuleEdgeSelect; - }; -}; -export interface UpdateTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was updated by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} -export type UpdateTableTemplateModulePayloadSelect = { - clientMutationId?: boolean; - tableTemplateModule?: { - select: TableTemplateModuleSelect; - }; - tableTemplateModuleEdge?: { - select: TableTemplateModuleEdgeSelect; - }; -}; -export interface DeleteTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was deleted by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} -export type DeleteTableTemplateModulePayloadSelect = { - clientMutationId?: boolean; - tableTemplateModule?: { - select: TableTemplateModuleSelect; - }; - tableTemplateModuleEdge?: { - select: TableTemplateModuleEdgeSelect; - }; -}; export interface CreateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was created by this mutation. */ @@ -24248,6 +25548,51 @@ export type DeleteRelationProvisionPayloadSelect = { select: RelationProvisionEdgeSelect; }; }; +export interface CreateSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was created by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} +export type CreateSessionSecretsModulePayloadSelect = { + clientMutationId?: boolean; + sessionSecretsModule?: { + select: SessionSecretsModuleSelect; + }; + sessionSecretsModuleEdge?: { + select: SessionSecretsModuleEdgeSelect; + }; +}; +export interface UpdateSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was updated by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} +export type UpdateSessionSecretsModulePayloadSelect = { + clientMutationId?: boolean; + sessionSecretsModule?: { + select: SessionSecretsModuleSelect; + }; + sessionSecretsModuleEdge?: { + select: SessionSecretsModuleEdgeSelect; + }; +}; +export interface DeleteSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was deleted by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} +export type DeleteSessionSecretsModulePayloadSelect = { + clientMutationId?: boolean; + sessionSecretsModule?: { + select: SessionSecretsModuleSelect; + }; + sessionSecretsModuleEdge?: { + select: SessionSecretsModuleEdgeSelect; + }; +}; export interface CreateSchemaGrantPayload { clientMutationId?: string | null; /** The `SchemaGrant` that was created by this mutation. */ @@ -25913,6 +27258,96 @@ export type DeleteStorageModulePayloadSelect = { select: StorageModuleEdgeSelect; }; }; +export interface CreateEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was created by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} +export type CreateEntityTypeProvisionPayloadSelect = { + clientMutationId?: boolean; + entityTypeProvision?: { + select: EntityTypeProvisionSelect; + }; + entityTypeProvisionEdge?: { + select: EntityTypeProvisionEdgeSelect; + }; +}; +export interface UpdateEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was updated by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} +export type UpdateEntityTypeProvisionPayloadSelect = { + clientMutationId?: boolean; + entityTypeProvision?: { + select: EntityTypeProvisionSelect; + }; + entityTypeProvisionEdge?: { + select: EntityTypeProvisionEdgeSelect; + }; +}; +export interface DeleteEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was deleted by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} +export type DeleteEntityTypeProvisionPayloadSelect = { + clientMutationId?: boolean; + entityTypeProvision?: { + select: EntityTypeProvisionSelect; + }; + entityTypeProvisionEdge?: { + select: EntityTypeProvisionEdgeSelect; + }; +}; +export interface CreateWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was created by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} +export type CreateWebauthnCredentialsModulePayloadSelect = { + clientMutationId?: boolean; + webauthnCredentialsModule?: { + select: WebauthnCredentialsModuleSelect; + }; + webauthnCredentialsModuleEdge?: { + select: WebauthnCredentialsModuleEdgeSelect; + }; +}; +export interface UpdateWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was updated by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} +export type UpdateWebauthnCredentialsModulePayloadSelect = { + clientMutationId?: boolean; + webauthnCredentialsModule?: { + select: WebauthnCredentialsModuleSelect; + }; + webauthnCredentialsModuleEdge?: { + select: WebauthnCredentialsModuleEdgeSelect; + }; +}; +export interface DeleteWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was deleted by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} +export type DeleteWebauthnCredentialsModulePayloadSelect = { + clientMutationId?: boolean; + webauthnCredentialsModule?: { + select: WebauthnCredentialsModuleSelect; + }; + webauthnCredentialsModuleEdge?: { + select: WebauthnCredentialsModuleEdgeSelect; + }; +}; export interface CreateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was created by this mutation. */ @@ -26273,6 +27708,51 @@ export type DeleteOrgOwnerGrantPayloadSelect = { select: OrgOwnerGrantEdgeSelect; }; }; +export interface CreateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was created by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type CreateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface UpdateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was updated by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type UpdateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface DeleteOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was deleted by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type DeleteOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; export interface CreateOrgGrantPayload { clientMutationId?: string | null; /** The `OrgGrant` that was created by this mutation. */ @@ -26813,51 +28293,6 @@ export type DeleteCryptoAddressPayloadSelect = { select: CryptoAddressEdgeSelect; }; }; -export interface CreateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was created by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type CreateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface UpdateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was updated by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type UpdateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface DeleteConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was deleted by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type DeleteConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; export interface CreateAppInvitePayload { clientMutationId?: string | null; /** The `AppInvite` that was created by this mutation. */ @@ -27364,49 +28799,60 @@ export type DeleteOrgLimitDefaultPayloadSelect = { select: OrgLimitDefaultEdgeSelect; }; }; -export interface CreateMembershipTypePayload { +export interface CreateDevicesModulePayload { clientMutationId?: string | null; - /** The `MembershipType` that was created by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; + /** The `DevicesModule` that was created by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; } -export type CreateMembershipTypePayloadSelect = { +export type CreateDevicesModulePayloadSelect = { clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; + devicesModule?: { + select: DevicesModuleSelect; }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; + devicesModuleEdge?: { + select: DevicesModuleEdgeSelect; }; }; -export interface UpdateMembershipTypePayload { +export interface UpdateDevicesModulePayload { clientMutationId?: string | null; - /** The `MembershipType` that was updated by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; + /** The `DevicesModule` that was updated by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; } -export type UpdateMembershipTypePayloadSelect = { +export type UpdateDevicesModulePayloadSelect = { clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; + devicesModule?: { + select: DevicesModuleSelect; }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; + devicesModuleEdge?: { + select: DevicesModuleEdgeSelect; }; }; -export interface DeleteMembershipTypePayload { +export interface DeleteDevicesModulePayload { clientMutationId?: string | null; - /** The `MembershipType` that was deleted by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; + /** The `DevicesModule` that was deleted by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; } -export type DeleteMembershipTypePayloadSelect = { +export type DeleteDevicesModulePayloadSelect = { clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; + devicesModule?: { + select: DevicesModuleSelect; }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; + devicesModuleEdge?: { + select: DevicesModuleEdgeSelect; + }; +}; +export interface CreateUserConnectedAccountPayload { + clientMutationId?: string | null; + /** The `UserConnectedAccount` that was created by this mutation. */ + userConnectedAccount?: UserConnectedAccount | null; +} +export type CreateUserConnectedAccountPayloadSelect = { + clientMutationId?: boolean; + userConnectedAccount?: { + select: UserConnectedAccountSelect; }; }; export interface CreateAppMembershipDefaultPayload { @@ -27544,6 +28990,51 @@ export type DeleteRateLimitsModulePayloadSelect = { select: RateLimitsModuleEdgeSelect; }; }; +export interface CreateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was created by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type CreateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface UpdateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was updated by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type UpdateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface DeleteMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was deleted by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type DeleteMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; export interface CreateOrgMembershipDefaultPayload { clientMutationId?: string | null; /** The `OrgMembershipDefault` that was created by this mutation. */ @@ -27856,6 +29347,14 @@ export type AppLevelRequirementEdgeSelect = { select: AppLevelRequirementSelect; }; }; +export interface CreateApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; +} +export type CreateApiKeyRecordSelect = { + apiKey?: boolean; + keyId?: boolean; +}; export interface BootstrapUserRecord { outUserId?: string | null; outEmail?: string | null; @@ -27896,7 +29395,7 @@ export type ProvisionRelationRecordSelect = { outSourceFieldId?: boolean; outTargetFieldId?: boolean; }; -export interface SignInOneTimeTokenRecord { +export interface SignInCrossOriginRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -27904,7 +29403,7 @@ export interface SignInOneTimeTokenRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInOneTimeTokenRecordSelect = { +export type SignInCrossOriginRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -27922,7 +29421,7 @@ export type ExtendTokenExpiresRecordSelect = { sessionId?: boolean; expiresAt?: boolean; }; -export interface SignInRecord { +export interface SignUpRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -27930,7 +29429,7 @@ export interface SignInRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInRecordSelect = { +export type SignUpRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -27938,21 +29437,25 @@ export type SignInRecordSelect = { isVerified?: boolean; totpEnabled?: boolean; }; -export interface SignUpRecord { +export interface SignInRecord { id?: string | null; userId?: string | null; accessToken?: string | null; accessTokenExpiresAt?: string | null; isVerified?: boolean | null; totpEnabled?: boolean | null; + mfaRequired?: boolean | null; + mfaChallengeToken?: string | null; } -export type SignUpRecordSelect = { +export type SignInRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; accessTokenExpiresAt?: boolean; isVerified?: boolean; totpEnabled?: boolean; + mfaRequired?: boolean; + mfaChallengeToken?: boolean; }; export interface ProvisionTableRecord { outTableId?: string | null; @@ -28022,6 +29525,18 @@ export type FieldEdgeSelect = { select: FieldSelect; }; }; +/** A `SpatialRelation` edge in the connection. */ +export interface SpatialRelationEdge { + cursor?: string | null; + /** The `SpatialRelation` at the end of the edge. */ + node?: SpatialRelation | null; +} +export type SpatialRelationEdgeSelect = { + cursor?: boolean; + node?: { + select: SpatialRelationSelect; + }; +}; /** A `ForeignKeyConstraint` edge in the connection. */ export interface ForeignKeyConstraintEdge { cursor?: string | null; @@ -28178,18 +29693,6 @@ export type EmbeddingChunkEdgeSelect = { select: EmbeddingChunkSelect; }; }; -/** A `TableTemplateModule` edge in the connection. */ -export interface TableTemplateModuleEdge { - cursor?: string | null; - /** The `TableTemplateModule` at the end of the edge. */ - node?: TableTemplateModule | null; -} -export type TableTemplateModuleEdgeSelect = { - cursor?: boolean; - node?: { - select: TableTemplateModuleSelect; - }; -}; /** A `SecureTableProvision` edge in the connection. */ export interface SecureTableProvisionEdge { cursor?: string | null; @@ -28214,6 +29717,18 @@ export type RelationProvisionEdgeSelect = { select: RelationProvisionSelect; }; }; +/** A `SessionSecretsModule` edge in the connection. */ +export interface SessionSecretsModuleEdge { + cursor?: string | null; + /** The `SessionSecretsModule` at the end of the edge. */ + node?: SessionSecretsModule | null; +} +export type SessionSecretsModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: SessionSecretsModuleSelect; + }; +}; /** A `SchemaGrant` edge in the connection. */ export interface SchemaGrantEdge { cursor?: string | null; @@ -28658,6 +30173,30 @@ export type StorageModuleEdgeSelect = { select: StorageModuleSelect; }; }; +/** A `EntityTypeProvision` edge in the connection. */ +export interface EntityTypeProvisionEdge { + cursor?: string | null; + /** The `EntityTypeProvision` at the end of the edge. */ + node?: EntityTypeProvision | null; +} +export type EntityTypeProvisionEdgeSelect = { + cursor?: boolean; + node?: { + select: EntityTypeProvisionSelect; + }; +}; +/** A `WebauthnCredentialsModule` edge in the connection. */ +export interface WebauthnCredentialsModuleEdge { + cursor?: string | null; + /** The `WebauthnCredentialsModule` at the end of the edge. */ + node?: WebauthnCredentialsModule | null; +} +export type WebauthnCredentialsModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: WebauthnCredentialsModuleSelect; + }; +}; /** A `DatabaseProvisionModule` edge in the connection. */ export interface DatabaseProvisionModuleEdge { cursor?: string | null; @@ -28754,6 +30293,18 @@ export type OrgOwnerGrantEdgeSelect = { select: OrgOwnerGrantSelect; }; }; +/** A `OrgMemberProfile` edge in the connection. */ +export interface OrgMemberProfileEdge { + cursor?: string | null; + /** The `OrgMemberProfile` at the end of the edge. */ + node?: OrgMemberProfile | null; +} +export type OrgMemberProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgMemberProfileSelect; + }; +}; /** A `OrgGrant` edge in the connection. */ export interface OrgGrantEdge { cursor?: string | null; @@ -28898,18 +30449,6 @@ export type CryptoAddressEdgeSelect = { select: CryptoAddressSelect; }; }; -/** A `ConnectedAccount` edge in the connection. */ -export interface ConnectedAccountEdge { - cursor?: string | null; - /** The `ConnectedAccount` at the end of the edge. */ - node?: ConnectedAccount | null; -} -export type ConnectedAccountEdgeSelect = { - cursor?: boolean; - node?: { - select: ConnectedAccountSelect; - }; -}; /** A `AppInvite` edge in the connection. */ export interface AppInviteEdge { cursor?: string | null; @@ -29042,16 +30581,16 @@ export type OrgLimitDefaultEdgeSelect = { select: OrgLimitDefaultSelect; }; }; -/** A `MembershipType` edge in the connection. */ -export interface MembershipTypeEdge { +/** A `DevicesModule` edge in the connection. */ +export interface DevicesModuleEdge { cursor?: string | null; - /** The `MembershipType` at the end of the edge. */ - node?: MembershipType | null; + /** The `DevicesModule` at the end of the edge. */ + node?: DevicesModule | null; } -export type MembershipTypeEdgeSelect = { +export type DevicesModuleEdgeSelect = { cursor?: boolean; node?: { - select: MembershipTypeSelect; + select: DevicesModuleSelect; }; }; /** A `AppMembershipDefault` edge in the connection. */ @@ -29090,6 +30629,18 @@ export type RateLimitsModuleEdgeSelect = { select: RateLimitsModuleSelect; }; }; +/** A `MembershipType` edge in the connection. */ +export interface MembershipTypeEdge { + cursor?: string | null; + /** The `MembershipType` at the end of the edge. */ + node?: MembershipType | null; +} +export type MembershipTypeEdgeSelect = { + cursor?: boolean; + node?: { + select: MembershipTypeSelect; + }; +}; /** A `OrgMembershipDefault` edge in the connection. */ export interface OrgMembershipDefaultEdge { cursor?: string | null; diff --git a/sdk/constructive-react/src/public/orm/models/devicesModule.ts b/sdk/constructive-react/src/public/orm/models/devicesModule.ts new file mode 100644 index 000000000..11386e4fe --- /dev/null +++ b/sdk/constructive-react/src/public/orm/models/devicesModule.ts @@ -0,0 +1,237 @@ +/** + * DevicesModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + DevicesModule, + DevicesModuleWithRelations, + DevicesModuleSelect, + DevicesModuleFilter, + DevicesModuleOrderBy, + CreateDevicesModuleInput, + UpdateDevicesModuleInput, + DevicesModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class DevicesModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + devicesModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'DevicesModule', + 'devicesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'DevicesModuleFilter', + 'DevicesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DevicesModule', + fieldName: 'devicesModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + devicesModules: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'DevicesModule', + 'devicesModules', + args.select, + { + where: args?.where, + }, + 'DevicesModuleFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DevicesModule', + fieldName: 'devicesModules', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + devicesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'DevicesModule', + 'devicesModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'DevicesModuleFilter', + 'DevicesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DevicesModule', + fieldName: 'devicesModule', + document, + variables, + transform: (data: { + devicesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + devicesModule: data.devicesModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createDevicesModule: { + devicesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'DevicesModule', + 'createDevicesModule', + 'devicesModule', + args.select, + args.data, + 'CreateDevicesModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DevicesModule', + fieldName: 'createDevicesModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + DevicesModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateDevicesModule: { + devicesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'DevicesModule', + 'updateDevicesModule', + 'devicesModule', + args.select, + args.where.id, + args.data, + 'UpdateDevicesModuleInput', + 'id', + 'devicesModulePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DevicesModule', + fieldName: 'updateDevicesModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteDevicesModule: { + devicesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'DevicesModule', + 'deleteDevicesModule', + 'devicesModule', + { + id: args.where.id, + }, + 'DeleteDevicesModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DevicesModule', + fieldName: 'deleteDevicesModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/public/orm/models/tableTemplateModule.ts b/sdk/constructive-react/src/public/orm/models/entityTypeProvision.ts similarity index 50% rename from sdk/constructive-react/src/public/orm/models/tableTemplateModule.ts rename to sdk/constructive-react/src/public/orm/models/entityTypeProvision.ts index c08032798..00ae9ebbc 100644 --- a/sdk/constructive-react/src/public/orm/models/tableTemplateModule.ts +++ b/sdk/constructive-react/src/public/orm/models/entityTypeProvision.ts @@ -1,5 +1,5 @@ /** - * TableTemplateModule model for ORM client + * EntityTypeProvision model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - TableTemplateModule, - TableTemplateModuleWithRelations, - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy, - CreateTableTemplateModuleInput, - UpdateTableTemplateModuleInput, - TableTemplateModulePatch, + EntityTypeProvision, + EntityTypeProvisionWithRelations, + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy, + CreateEntityTypeProvisionInput, + UpdateEntityTypeProvisionInput, + EntityTypeProvisionPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class TableTemplateModuleModel { +export class EntityTypeProvisionModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - tableTemplateModules: ConnectionResult>; + entityTypeProvisions: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'TableTemplateModule', - 'tableTemplateModules', + 'EntityTypeProvision', + 'entityTypeProvisions', args.select, { where: args?.where, @@ -56,58 +56,58 @@ export class TableTemplateModuleModel { before: args?.before, offset: args?.offset, }, - 'TableTemplateModuleFilter', - 'TableTemplateModuleOrderBy', + 'EntityTypeProvisionFilter', + 'EntityTypeProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'TableTemplateModule', - fieldName: 'tableTemplateModules', + operationName: 'EntityTypeProvision', + fieldName: 'entityTypeProvisions', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - tableTemplateModules: { - nodes: InferSelectResult[]; + entityTypeProvisions: { + nodes: InferSelectResult[]; }; }> { const { document, variables } = buildFindFirstDocument( - 'TableTemplateModule', - 'tableTemplateModules', + 'EntityTypeProvision', + 'entityTypeProvisions', args.select, { where: args?.where, }, - 'TableTemplateModuleFilter', + 'EntityTypeProvisionFilter', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'TableTemplateModule', - fieldName: 'tableTemplateModules', + operationName: 'EntityTypeProvision', + fieldName: 'entityTypeProvisions', document, variables, }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - tableTemplateModule: InferSelectResult | null; + entityTypeProvision: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'TableTemplateModule', - 'tableTemplateModules', + 'EntityTypeProvision', + 'entityTypeProvisions', args.select, { where: { @@ -117,90 +117,90 @@ export class TableTemplateModuleModel { }, first: 1, }, - 'TableTemplateModuleFilter', - 'TableTemplateModuleOrderBy', + 'EntityTypeProvisionFilter', + 'EntityTypeProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'TableTemplateModule', - fieldName: 'tableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'entityTypeProvision', document, variables, transform: (data: { - tableTemplateModules?: { - nodes?: InferSelectResult[]; + entityTypeProvisions?: { + nodes?: InferSelectResult[]; }; }) => ({ - tableTemplateModule: data.tableTemplateModules?.nodes?.[0] ?? null, + entityTypeProvision: data.entityTypeProvisions?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createTableTemplateModule: { - tableTemplateModule: InferSelectResult; + createEntityTypeProvision: { + entityTypeProvision: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'TableTemplateModule', - 'createTableTemplateModule', - 'tableTemplateModule', + 'EntityTypeProvision', + 'createEntityTypeProvision', + 'entityTypeProvision', args.select, args.data, - 'CreateTableTemplateModuleInput', + 'CreateEntityTypeProvisionInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'TableTemplateModule', - fieldName: 'createTableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'createEntityTypeProvision', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - TableTemplateModulePatch + EntityTypeProvisionPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateTableTemplateModule: { - tableTemplateModule: InferSelectResult; + updateEntityTypeProvision: { + entityTypeProvision: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'TableTemplateModule', - 'updateTableTemplateModule', - 'tableTemplateModule', + 'EntityTypeProvision', + 'updateEntityTypeProvision', + 'entityTypeProvision', args.select, args.where.id, args.data, - 'UpdateTableTemplateModuleInput', + 'UpdateEntityTypeProvisionInput', 'id', - 'tableTemplateModulePatch', + 'entityTypeProvisionPatch', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'TableTemplateModule', - fieldName: 'updateTableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'updateEntityTypeProvision', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -208,28 +208,28 @@ export class TableTemplateModuleModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteTableTemplateModule: { - tableTemplateModule: InferSelectResult; + deleteEntityTypeProvision: { + entityTypeProvision: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'TableTemplateModule', - 'deleteTableTemplateModule', - 'tableTemplateModule', + 'EntityTypeProvision', + 'deleteEntityTypeProvision', + 'entityTypeProvision', { id: args.where.id, }, - 'DeleteTableTemplateModuleInput', + 'DeleteEntityTypeProvisionInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'TableTemplateModule', - fieldName: 'deleteTableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'deleteEntityTypeProvision', document, variables, }); diff --git a/sdk/constructive-react/src/public/orm/models/index.ts b/sdk/constructive-react/src/public/orm/models/index.ts index 0eacaeee7..3a057bb2f 100644 --- a/sdk/constructive-react/src/public/orm/models/index.ts +++ b/sdk/constructive-react/src/public/orm/models/index.ts @@ -15,6 +15,7 @@ export { SchemaModel } from './schema'; export { TableModel } from './table'; export { CheckConstraintModel } from './checkConstraint'; export { FieldModel } from './field'; +export { SpatialRelationModel } from './spatialRelation'; export { ForeignKeyConstraintModel } from './foreignKeyConstraint'; export { FullTextSearchModel } from './fullTextSearch'; export { IndexModel } from './indexModel'; @@ -28,9 +29,9 @@ export { ViewTableModel } from './viewTable'; export { ViewGrantModel } from './viewGrant'; export { ViewRuleModel } from './viewRule'; export { EmbeddingChunkModel } from './embeddingChunk'; -export { TableTemplateModuleModel } from './tableTemplateModule'; export { SecureTableProvisionModel } from './secureTableProvision'; export { RelationProvisionModel } from './relationProvision'; +export { SessionSecretsModuleModel } from './sessionSecretsModule'; export { SchemaGrantModel } from './schemaGrant'; export { DefaultPrivilegeModel } from './defaultPrivilege'; export { EnumModel } from './enum'; @@ -68,6 +69,8 @@ export { BlueprintModel } from './blueprint'; export { BlueprintTemplateModel } from './blueprintTemplate'; export { BlueprintConstructionModel } from './blueprintConstruction'; export { StorageModuleModel } from './storageModule'; +export { EntityTypeProvisionModel } from './entityTypeProvision'; +export { WebauthnCredentialsModuleModel } from './webauthnCredentialsModule'; export { DatabaseProvisionModuleModel } from './databaseProvisionModule'; export { AppAdminGrantModel } from './appAdminGrant'; export { AppOwnerGrantModel } from './appOwnerGrant'; @@ -76,6 +79,7 @@ export { OrgMembershipModel } from './orgMembership'; export { OrgMemberModel } from './orgMember'; export { OrgAdminGrantModel } from './orgAdminGrant'; export { OrgOwnerGrantModel } from './orgOwnerGrant'; +export { OrgMemberProfileModel } from './orgMemberProfile'; export { OrgGrantModel } from './orgGrant'; export { OrgChartEdgeModel } from './orgChartEdge'; export { OrgChartEdgeGrantModel } from './orgChartEdgeGrant'; @@ -88,7 +92,6 @@ export { AppLevelModel } from './appLevel'; export { EmailModel } from './email'; export { PhoneNumberModel } from './phoneNumber'; export { CryptoAddressModel } from './cryptoAddress'; -export { ConnectedAccountModel } from './connectedAccount'; export { AppInviteModel } from './appInvite'; export { AppClaimedInviteModel } from './appClaimedInvite'; export { OrgInviteModel } from './orgInvite'; @@ -101,10 +104,12 @@ export { RoleTypeModel } from './roleType'; export { MigrateFileModel } from './migrateFile'; export { AppLimitDefaultModel } from './appLimitDefault'; export { OrgLimitDefaultModel } from './orgLimitDefault'; -export { MembershipTypeModel } from './membershipType'; +export { DevicesModuleModel } from './devicesModule'; +export { UserConnectedAccountModel } from './userConnectedAccount'; export { AppMembershipDefaultModel } from './appMembershipDefault'; export { CommitModel } from './commit'; export { RateLimitsModuleModel } from './rateLimitsModule'; +export { MembershipTypeModel } from './membershipType'; export { OrgMembershipDefaultModel } from './orgMembershipDefault'; export { RlsModuleModel } from './rlsModule'; export { SqlActionModel } from './sqlAction'; diff --git a/sdk/constructive-cli/src/auth/orm/models/connectedAccount.ts b/sdk/constructive-react/src/public/orm/models/orgMemberProfile.ts similarity index 52% rename from sdk/constructive-cli/src/auth/orm/models/connectedAccount.ts rename to sdk/constructive-react/src/public/orm/models/orgMemberProfile.ts index c9def156d..de551ba79 100644 --- a/sdk/constructive-cli/src/auth/orm/models/connectedAccount.ts +++ b/sdk/constructive-react/src/public/orm/models/orgMemberProfile.ts @@ -1,5 +1,5 @@ /** - * ConnectedAccount model for ORM client + * OrgMemberProfile model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - ConnectedAccount, - ConnectedAccountWithRelations, - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy, - CreateConnectedAccountInput, - UpdateConnectedAccountInput, - ConnectedAccountPatch, + OrgMemberProfile, + OrgMemberProfileWithRelations, + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, + CreateOrgMemberProfileInput, + UpdateOrgMemberProfileInput, + OrgMemberProfilePatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class ConnectedAccountModel { +export class OrgMemberProfileModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccounts: ConnectionResult>; + orgMemberProfiles: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: args?.where, @@ -56,58 +56,58 @@ export class ConnectedAccountModel { before: args?.before, offset: args?.offset, }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccounts: { - nodes: InferSelectResult[]; + orgMemberProfiles: { + nodes: InferSelectResult[]; }; }> { const { document, variables } = buildFindFirstDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: args?.where, }, - 'ConnectedAccountFilter', + 'OrgMemberProfileFilter', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', document, variables, }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - connectedAccount: InferSelectResult | null; + orgMemberProfile: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', + 'OrgMemberProfile', + 'orgMemberProfiles', args.select, { where: { @@ -117,90 +117,90 @@ export class ConnectedAccountModel { }, first: 1, }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfile', document, variables, transform: (data: { - connectedAccounts?: { - nodes?: InferSelectResult[]; + orgMemberProfiles?: { + nodes?: InferSelectResult[]; }; }) => ({ - connectedAccount: data.connectedAccounts?.nodes?.[0] ?? null, + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createConnectedAccount: { - connectedAccount: InferSelectResult; + createOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'ConnectedAccount', - 'createConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'createOrgMemberProfile', + 'orgMemberProfile', args.select, args.data, - 'CreateConnectedAccountInput', + 'CreateOrgMemberProfileInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'createConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'createOrgMemberProfile', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - ConnectedAccountPatch + OrgMemberProfilePatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateConnectedAccount: { - connectedAccount: InferSelectResult; + updateOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'ConnectedAccount', - 'updateConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'updateOrgMemberProfile', + 'orgMemberProfile', args.select, args.where.id, args.data, - 'UpdateConnectedAccountInput', + 'UpdateOrgMemberProfileInput', 'id', - 'connectedAccountPatch', + 'orgMemberProfilePatch', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'updateConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'updateOrgMemberProfile', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -208,28 +208,28 @@ export class ConnectedAccountModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteConnectedAccount: { - connectedAccount: InferSelectResult; + deleteOrgMemberProfile: { + orgMemberProfile: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'ConnectedAccount', - 'deleteConnectedAccount', - 'connectedAccount', + 'OrgMemberProfile', + 'deleteOrgMemberProfile', + 'orgMemberProfile', { id: args.where.id, }, - 'DeleteConnectedAccountInput', + 'DeleteOrgMemberProfileInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'deleteConnectedAccount', + operationName: 'OrgMemberProfile', + fieldName: 'deleteOrgMemberProfile', document, variables, }); diff --git a/sdk/constructive-react/src/public/orm/models/sessionSecretsModule.ts b/sdk/constructive-react/src/public/orm/models/sessionSecretsModule.ts new file mode 100644 index 000000000..b333c87f0 --- /dev/null +++ b/sdk/constructive-react/src/public/orm/models/sessionSecretsModule.ts @@ -0,0 +1,239 @@ +/** + * SessionSecretsModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + SessionSecretsModule, + SessionSecretsModuleWithRelations, + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy, + CreateSessionSecretsModuleInput, + UpdateSessionSecretsModuleInput, + SessionSecretsModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class SessionSecretsModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + sessionSecretsModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'SessionSecretsModule', + 'sessionSecretsModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'SessionSecretsModuleFilter', + 'SessionSecretsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SessionSecretsModule', + fieldName: 'sessionSecretsModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + sessionSecretsModules: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'SessionSecretsModule', + 'sessionSecretsModules', + args.select, + { + where: args?.where, + }, + 'SessionSecretsModuleFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SessionSecretsModule', + fieldName: 'sessionSecretsModules', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + sessionSecretsModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'SessionSecretsModule', + 'sessionSecretsModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'SessionSecretsModuleFilter', + 'SessionSecretsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SessionSecretsModule', + fieldName: 'sessionSecretsModule', + document, + variables, + transform: (data: { + sessionSecretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sessionSecretsModule: data.sessionSecretsModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'SessionSecretsModule', + 'createSessionSecretsModule', + 'sessionSecretsModule', + args.select, + args.data, + 'CreateSessionSecretsModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SessionSecretsModule', + fieldName: 'createSessionSecretsModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + SessionSecretsModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'SessionSecretsModule', + 'updateSessionSecretsModule', + 'sessionSecretsModule', + args.select, + args.where.id, + args.data, + 'UpdateSessionSecretsModuleInput', + 'id', + 'sessionSecretsModulePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SessionSecretsModule', + fieldName: 'updateSessionSecretsModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'SessionSecretsModule', + 'deleteSessionSecretsModule', + 'sessionSecretsModule', + { + id: args.where.id, + }, + 'DeleteSessionSecretsModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SessionSecretsModule', + fieldName: 'deleteSessionSecretsModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/public/orm/models/spatialRelation.ts b/sdk/constructive-react/src/public/orm/models/spatialRelation.ts new file mode 100644 index 000000000..c1d09c31a --- /dev/null +++ b/sdk/constructive-react/src/public/orm/models/spatialRelation.ts @@ -0,0 +1,237 @@ +/** + * SpatialRelation model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + SpatialRelation, + SpatialRelationWithRelations, + SpatialRelationSelect, + SpatialRelationFilter, + SpatialRelationOrderBy, + CreateSpatialRelationInput, + UpdateSpatialRelationInput, + SpatialRelationPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class SpatialRelationModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + spatialRelations: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'SpatialRelation', + 'spatialRelations', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'SpatialRelationFilter', + 'SpatialRelationOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SpatialRelation', + fieldName: 'spatialRelations', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + spatialRelations: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'SpatialRelation', + 'spatialRelations', + args.select, + { + where: args?.where, + }, + 'SpatialRelationFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SpatialRelation', + fieldName: 'spatialRelations', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + spatialRelation: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'SpatialRelation', + 'spatialRelations', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'SpatialRelationFilter', + 'SpatialRelationOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SpatialRelation', + fieldName: 'spatialRelation', + document, + variables, + transform: (data: { + spatialRelations?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + spatialRelation: data.spatialRelations?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'SpatialRelation', + 'createSpatialRelation', + 'spatialRelation', + args.select, + args.data, + 'CreateSpatialRelationInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SpatialRelation', + fieldName: 'createSpatialRelation', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + SpatialRelationPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'SpatialRelation', + 'updateSpatialRelation', + 'spatialRelation', + args.select, + args.where.id, + args.data, + 'UpdateSpatialRelationInput', + 'id', + 'spatialRelationPatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SpatialRelation', + fieldName: 'updateSpatialRelation', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'SpatialRelation', + 'deleteSpatialRelation', + 'spatialRelation', + { + id: args.where.id, + }, + 'DeleteSpatialRelationInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SpatialRelation', + fieldName: 'deleteSpatialRelation', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/public/orm/models/userConnectedAccount.ts b/sdk/constructive-react/src/public/orm/models/userConnectedAccount.ts new file mode 100644 index 000000000..45bbea7f4 --- /dev/null +++ b/sdk/constructive-react/src/public/orm/models/userConnectedAccount.ts @@ -0,0 +1,169 @@ +/** + * UserConnectedAccount model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + UserConnectedAccount, + UserConnectedAccountWithRelations, + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, + CreateUserConnectedAccountInput, + UpdateUserConnectedAccountInput, + UserConnectedAccountPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserConnectedAccountModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + }, + 'UserConnectedAccountFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccount: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccount', + document, + variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserConnectedAccount: { + userConnectedAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserConnectedAccount', + 'createUserConnectedAccount', + 'userConnectedAccount', + args.select, + args.data, + 'CreateUserConnectedAccountInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserConnectedAccount', + fieldName: 'createUserConnectedAccount', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/public/orm/models/webauthnCredentialsModule.ts b/sdk/constructive-react/src/public/orm/models/webauthnCredentialsModule.ts new file mode 100644 index 000000000..78e687c34 --- /dev/null +++ b/sdk/constructive-react/src/public/orm/models/webauthnCredentialsModule.ts @@ -0,0 +1,239 @@ +/** + * WebauthnCredentialsModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + WebauthnCredentialsModule, + WebauthnCredentialsModuleWithRelations, + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy, + CreateWebauthnCredentialsModuleInput, + UpdateWebauthnCredentialsModuleInput, + WebauthnCredentialsModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class WebauthnCredentialsModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + webauthnCredentialsModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'WebauthnCredentialsModule', + 'webauthnCredentialsModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'WebauthnCredentialsModuleFilter', + 'WebauthnCredentialsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'WebauthnCredentialsModule', + fieldName: 'webauthnCredentialsModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + webauthnCredentialsModules: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'WebauthnCredentialsModule', + 'webauthnCredentialsModules', + args.select, + { + where: args?.where, + }, + 'WebauthnCredentialsModuleFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'WebauthnCredentialsModule', + fieldName: 'webauthnCredentialsModules', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + webauthnCredentialsModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'WebauthnCredentialsModule', + 'webauthnCredentialsModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'WebauthnCredentialsModuleFilter', + 'WebauthnCredentialsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'WebauthnCredentialsModule', + fieldName: 'webauthnCredentialsModule', + document, + variables, + transform: (data: { + webauthnCredentialsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredentialsModule: data.webauthnCredentialsModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'WebauthnCredentialsModule', + 'createWebauthnCredentialsModule', + 'webauthnCredentialsModule', + args.select, + args.data, + 'CreateWebauthnCredentialsModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'WebauthnCredentialsModule', + fieldName: 'createWebauthnCredentialsModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + WebauthnCredentialsModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'WebauthnCredentialsModule', + 'updateWebauthnCredentialsModule', + 'webauthnCredentialsModule', + args.select, + args.where.id, + args.data, + 'UpdateWebauthnCredentialsModuleInput', + 'id', + 'webauthnCredentialsModulePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'WebauthnCredentialsModule', + fieldName: 'updateWebauthnCredentialsModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'WebauthnCredentialsModule', + 'deleteWebauthnCredentialsModule', + 'webauthnCredentialsModule', + { + id: args.where.id, + }, + 'DeleteWebauthnCredentialsModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'WebauthnCredentialsModule', + fieldName: 'deleteWebauthnCredentialsModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-react/src/public/orm/mutation/index.ts b/sdk/constructive-react/src/public/orm/mutation/index.ts index dfdfb23ab..1cd5aec35 100644 --- a/sdk/constructive-react/src/public/orm/mutation/index.ts +++ b/sdk/constructive-react/src/public/orm/mutation/index.ts @@ -12,6 +12,9 @@ import type { AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, + DisconnectAccountInput, + RevokeApiKeyInput, + RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, SubmitAppInviteCodeInput, @@ -23,9 +26,12 @@ import type { FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, + ProvisionNewUserInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, + CreateApiKeyInput, + ProvisionSpatialRelationInput, BootstrapUserInput, SetFieldOrderInput, ProvisionUniqueConstraintInput, @@ -39,12 +45,12 @@ import type { SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, - SignInOneTimeTokenInput, + SignInCrossOriginInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, - SignInInput, SignUpInput, - OneTimeTokenInput, + RequestCrossOriginTokenInput, + SignInInput, ProvisionTableInput, SendVerificationEmailInput, ForgotPasswordInput, @@ -56,6 +62,9 @@ import type { AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, + DisconnectAccountPayload, + RevokeApiKeyPayload, + RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, SubmitAppInviteCodePayload, @@ -67,9 +76,12 @@ import type { FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, + ProvisionNewUserPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, + CreateApiKeyPayload, + ProvisionSpatialRelationPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionUniqueConstraintPayload, @@ -83,12 +95,12 @@ import type { SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, - SignInOneTimeTokenPayload, + SignInCrossOriginPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, - SignInPayload, SignUpPayload, - OneTimeTokenPayload, + RequestCrossOriginTokenPayload, + SignInPayload, ProvisionTablePayload, SendVerificationEmailPayload, ForgotPasswordPayload, @@ -100,6 +112,9 @@ import type { AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, + DisconnectAccountPayloadSelect, + RevokeApiKeyPayloadSelect, + RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, SubmitAppInviteCodePayloadSelect, @@ -111,9 +126,12 @@ import type { FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, + ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, + CreateApiKeyPayloadSelect, + ProvisionSpatialRelationPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionUniqueConstraintPayloadSelect, @@ -127,12 +145,12 @@ import type { SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, - SignInOneTimeTokenPayloadSelect, + SignInCrossOriginPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, - SignInPayloadSelect, SignUpPayloadSelect, - OneTimeTokenPayloadSelect, + RequestCrossOriginTokenPayloadSelect, + SignInPayloadSelect, ProvisionTablePayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, @@ -156,6 +174,15 @@ export interface CancelDatabaseTransferVariables { export interface RejectDatabaseTransferVariables { input: RejectDatabaseTransferInput; } +export interface DisconnectAccountVariables { + input: DisconnectAccountInput; +} +export interface RevokeApiKeyVariables { + input: RevokeApiKeyInput; +} +export interface RevokeSessionVariables { + input: RevokeSessionInput; +} export interface VerifyPasswordVariables { input: VerifyPasswordInput; } @@ -188,11 +215,14 @@ export interface InitEmptyRepoVariables { } /** * Variables for constructBlueprint - * Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. + * 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. */ export interface ConstructBlueprintVariables { input: ConstructBlueprintInput; } +export interface ProvisionNewUserVariables { + input: ProvisionNewUserInput; +} export interface ResetPasswordVariables { input: ResetPasswordInput; } @@ -206,6 +236,16 @@ export interface RemoveNodeAtPathVariables { export interface CopyTemplateToBlueprintVariables { input: CopyTemplateToBlueprintInput; } +export interface CreateApiKeyVariables { + input: CreateApiKeyInput; +} +/** + * Variables for provisionSpatialRelation + * Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + */ +export interface ProvisionSpatialRelationVariables { + input: ProvisionSpatialRelationInput; +} export interface BootstrapUserVariables { input: BootstrapUserInput; } @@ -261,8 +301,8 @@ export interface ProvisionRelationVariables { export interface ApplyRlsVariables { input: ApplyRlsInput; } -export interface SignInOneTimeTokenVariables { - input: SignInOneTimeTokenInput; +export interface SignInCrossOriginVariables { + input: SignInCrossOriginInput; } /** * Variables for createUserDatabase @@ -289,14 +329,14 @@ export interface CreateUserDatabaseVariables { export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; } -export interface SignInVariables { - input: SignInInput; -} export interface SignUpVariables { input: SignUpInput; } -export interface OneTimeTokenVariables { - input: OneTimeTokenInput; +export interface RequestCrossOriginTokenVariables { + input: RequestCrossOriginTokenInput; +} +export interface SignInVariables { + input: SignInInput; } /** * Variables for provisionTable @@ -487,6 +527,93 @@ export function createMutationOperations(client: OrmClient) { 'RejectDatabaseTransferPayload' ), }), + disconnectAccount: ( + args: DisconnectAccountVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + disconnectAccount: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'DisconnectAccount', + fieldName: 'disconnectAccount', + ...buildCustomDocument( + 'mutation', + 'DisconnectAccount', + 'disconnectAccount', + options.select, + args, + [ + { + name: 'input', + type: 'DisconnectAccountInput!', + }, + ], + connectionFieldsMap, + 'DisconnectAccountPayload' + ), + }), + revokeApiKey: ( + args: RevokeApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeApiKey', + fieldName: 'revokeApiKey', + ...buildCustomDocument( + 'mutation', + 'RevokeApiKey', + 'revokeApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeApiKeyInput!', + }, + ], + connectionFieldsMap, + 'RevokeApiKeyPayload' + ), + }), + revokeSession: ( + args: RevokeSessionVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeSession: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeSession', + fieldName: 'revokeSession', + ...buildCustomDocument( + 'mutation', + 'RevokeSession', + 'revokeSession', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeSessionInput!', + }, + ], + connectionFieldsMap, + 'RevokeSessionPayload' + ), + }), verifyPassword: ( args: VerifyPasswordVariables, options: { @@ -806,6 +933,35 @@ export function createMutationOperations(client: OrmClient) { 'ConstructBlueprintPayload' ), }), + provisionNewUser: ( + args: ProvisionNewUserVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + provisionNewUser: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ProvisionNewUser', + fieldName: 'provisionNewUser', + ...buildCustomDocument( + 'mutation', + 'ProvisionNewUser', + 'provisionNewUser', + options.select, + args, + [ + { + name: 'input', + type: 'ProvisionNewUserInput!', + }, + ], + connectionFieldsMap, + 'ProvisionNewUserPayload' + ), + }), resetPassword: ( args: ResetPasswordVariables, options: { @@ -893,6 +1049,64 @@ export function createMutationOperations(client: OrmClient) { 'CopyTemplateToBlueprintPayload' ), }), + createApiKey: ( + args: CreateApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + createApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'CreateApiKey', + fieldName: 'createApiKey', + ...buildCustomDocument( + 'mutation', + 'CreateApiKey', + 'createApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'CreateApiKeyInput!', + }, + ], + connectionFieldsMap, + 'CreateApiKeyPayload' + ), + }), + provisionSpatialRelation: ( + args: ProvisionSpatialRelationVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + provisionSpatialRelation: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ProvisionSpatialRelation', + fieldName: 'provisionSpatialRelation', + ...buildCustomDocument( + 'mutation', + 'ProvisionSpatialRelation', + 'provisionSpatialRelation', + options.select, + args, + [ + { + name: 'input', + type: 'ProvisionSpatialRelationInput!', + }, + ], + connectionFieldsMap, + 'ProvisionSpatialRelationPayload' + ), + }), bootstrapUser: ( args: BootstrapUserVariables, options: { @@ -1270,33 +1484,33 @@ export function createMutationOperations(client: OrmClient) { 'ApplyRlsPayload' ), }), - signInOneTimeToken: ( - args: SignInOneTimeTokenVariables, + signInCrossOrigin: ( + args: SignInCrossOriginVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signInOneTimeToken: InferSelectResult | null; + signInCrossOrigin: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignInOneTimeToken', - fieldName: 'signInOneTimeToken', + operationName: 'SignInCrossOrigin', + fieldName: 'signInCrossOrigin', ...buildCustomDocument( 'mutation', - 'SignInOneTimeToken', - 'signInOneTimeToken', + 'SignInCrossOrigin', + 'signInCrossOrigin', options.select, args, [ { name: 'input', - type: 'SignInOneTimeTokenInput!', + type: 'SignInCrossOriginInput!', }, ], connectionFieldsMap, - 'SignInOneTimeTokenPayload' + 'SignInCrossOriginPayload' ), }), createUserDatabase: ( @@ -1357,91 +1571,91 @@ export function createMutationOperations(client: OrmClient) { 'ExtendTokenExpiresPayload' ), }), - signIn: ( - args: SignInVariables, + signUp: ( + args: SignUpVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signIn: InferSelectResult | null; + signUp: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignIn', - fieldName: 'signIn', + operationName: 'SignUp', + fieldName: 'signUp', ...buildCustomDocument( 'mutation', - 'SignIn', - 'signIn', + 'SignUp', + 'signUp', options.select, args, [ { name: 'input', - type: 'SignInInput!', + type: 'SignUpInput!', }, ], connectionFieldsMap, - 'SignInPayload' + 'SignUpPayload' ), }), - signUp: ( - args: SignUpVariables, + requestCrossOriginToken: ( + args: RequestCrossOriginTokenVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signUp: InferSelectResult | null; + requestCrossOriginToken: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignUp', - fieldName: 'signUp', + operationName: 'RequestCrossOriginToken', + fieldName: 'requestCrossOriginToken', ...buildCustomDocument( 'mutation', - 'SignUp', - 'signUp', + 'RequestCrossOriginToken', + 'requestCrossOriginToken', options.select, args, [ { name: 'input', - type: 'SignUpInput!', + type: 'RequestCrossOriginTokenInput!', }, ], connectionFieldsMap, - 'SignUpPayload' + 'RequestCrossOriginTokenPayload' ), }), - oneTimeToken: ( - args: OneTimeTokenVariables, + signIn: ( + args: SignInVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - oneTimeToken: InferSelectResult | null; + signIn: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'OneTimeToken', - fieldName: 'oneTimeToken', + operationName: 'SignIn', + fieldName: 'signIn', ...buildCustomDocument( 'mutation', - 'OneTimeToken', - 'oneTimeToken', + 'SignIn', + 'signIn', options.select, args, [ { name: 'input', - type: 'OneTimeTokenInput!', + type: 'SignInInput!', }, ], connectionFieldsMap, - 'OneTimeTokenPayload' + 'SignInPayload' ), }), provisionTable: ( diff --git a/sdk/constructive-react/src/public/orm/query/index.ts b/sdk/constructive-react/src/public/orm/query/index.ts index 424b81e24..d79ab541d 100644 --- a/sdk/constructive-react/src/public/orm/query/index.ts +++ b/sdk/constructive-react/src/public/orm/query/index.ts @@ -17,6 +17,9 @@ import type { AppLevelRequirementConnection, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; +export interface RequireStepUpVariables { + stepUpType?: string; +} export interface AppPermissionsGetPaddedMaskVariables { mask?: string; } @@ -32,6 +35,15 @@ export interface RevParseVariables { storeId?: string; refname?: string; } +/** + * Variables for resolveBlueprintField + * Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + */ +export interface ResolveBlueprintFieldVariables { + databaseId?: string; + tableId?: string; + fieldName?: string; +} export interface OrgIsManagerOfVariables { pEntityId?: string; pManagerId?: string; @@ -152,6 +164,25 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + currentUserAgent: (options?: { select?: Record }) => + new QueryBuilder<{ + currentUserAgent: string | null; + }>({ + client, + operation: 'query', + operationName: 'CurrentUserAgent', + fieldName: 'currentUserAgent', + ...buildCustomDocument( + 'query', + 'CurrentUserAgent', + 'currentUserAgent', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), currentIpAddress: (options?: { select?: Record }) => new QueryBuilder<{ currentIpAddress: string | null; @@ -171,21 +202,31 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentUserAgent: (options?: { select?: Record }) => + requireStepUp: ( + args: RequireStepUpVariables, + options?: { + select?: Record; + } + ) => new QueryBuilder<{ - currentUserAgent: string | null; + requireStepUp: boolean | null; }>({ client, operation: 'query', - operationName: 'CurrentUserAgent', - fieldName: 'currentUserAgent', + operationName: 'RequireStepUp', + fieldName: 'requireStepUp', ...buildCustomDocument( 'query', - 'CurrentUserAgent', - 'currentUserAgent', + 'RequireStepUp', + 'requireStepUp', options?.select, - undefined, - [], + args, + [ + { + name: 'stepUpType', + type: 'String', + }, + ], connectionFieldsMap, undefined ), @@ -318,6 +359,43 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + resolveBlueprintField: ( + args: ResolveBlueprintFieldVariables, + options?: { + select?: Record; + } + ) => + new QueryBuilder<{ + resolveBlueprintField: string | null; + }>({ + client, + operation: 'query', + operationName: 'ResolveBlueprintField', + fieldName: 'resolveBlueprintField', + ...buildCustomDocument( + 'query', + 'ResolveBlueprintField', + 'resolveBlueprintField', + options?.select, + args, + [ + { + name: 'databaseId', + type: 'UUID', + }, + { + name: 'tableId', + type: 'UUID', + }, + { + name: 'fieldName', + type: 'String', + }, + ], + connectionFieldsMap, + undefined + ), + }), orgIsManagerOf: ( args: OrgIsManagerOfVariables, options?: { diff --git a/sdk/constructive-react/src/public/schema-types.ts b/sdk/constructive-react/src/public/schema-types.ts index 31aea28f3..ced7e3959 100644 --- a/sdk/constructive-react/src/public/schema-types.ts +++ b/sdk/constructive-react/src/public/schema-types.ts @@ -31,7 +31,6 @@ import type { BlueprintTemplate, CheckConstraint, Commit, - ConnectedAccount, ConnectedAccountsModule, CryptoAddress, CryptoAddressesModule, @@ -42,11 +41,13 @@ import type { DefaultIdsModule, DefaultPrivilege, DenormalizedTableField, + DevicesModule, Domain, Email, EmailsModule, EmbeddingChunk, EncryptedSecretsModule, + EntityTypeProvision, Enum, Field, ForeignKeyConstraint, @@ -73,6 +74,7 @@ import type { OrgLimit, OrgLimitDefault, OrgMember, + OrgMemberProfile, OrgMembership, OrgMembershipDefault, OrgOwnerGrant, @@ -93,27 +95,30 @@ import type { SchemaGrant, SecretsModule, SecureTableProvision, + SessionSecretsModule, SessionsModule, Site, SiteMetadatum, SiteModule, SiteTheme, + SpatialRelation, SqlAction, StorageModule, Store, Table, TableGrant, - TableTemplateModule, Trigger, TriggerFunction, UniqueConstraint, User, UserAuthModule, + UserConnectedAccount, UsersModule, View, ViewGrant, ViewRule, ViewTable, + WebauthnCredentialsModule, BigFloatFilter, BigIntFilter, BitStringFilter, @@ -173,6 +178,41 @@ export type CheckConstraintOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `SpatialRelation`. */ +export type SpatialRelationOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'FIELD_ID_ASC' + | 'FIELD_ID_DESC' + | 'REF_TABLE_ID_ASC' + | 'REF_TABLE_ID_DESC' + | 'REF_FIELD_ID_ASC' + | 'REF_FIELD_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'OPERATOR_ASC' + | 'OPERATOR_DESC' + | 'PARAM_NAME_ASC' + | 'PARAM_NAME_DESC' + | 'CATEGORY_ASC' + | 'CATEGORY_DESC' + | 'MODULE_ASC' + | 'MODULE_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'TAGS_ASC' + | 'TAGS_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `Field`. */ export type FieldOrderBy = | 'NATURAL' @@ -617,29 +657,6 @@ export type EmbeddingChunkOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `TableTemplateModule`. */ -export type TableTemplateModuleOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'OWNER_TABLE_ID_ASC' - | 'OWNER_TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC' - | 'NODE_TYPE_ASC' - | 'NODE_TYPE_DESC' - | 'DATA_ASC' - | 'DATA_DESC'; /** Methods to use when ordering `SecureTableProvision`. */ export type SecureTableProvisionOrderBy = | 'NATURAL' @@ -744,6 +761,23 @@ export type RelationProvisionOrderBy = | 'OUT_SOURCE_FIELD_ID_DESC' | 'OUT_TARGET_FIELD_ID_ASC' | 'OUT_TARGET_FIELD_ID_DESC'; +/** Methods to use when ordering `SessionSecretsModule`. */ +export type SessionSecretsModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'SESSIONS_TABLE_ID_ASC' + | 'SESSIONS_TABLE_ID_DESC'; /** Methods to use when ordering `Table`. */ export type TableOrderBy = | 'NATURAL' @@ -1447,7 +1481,9 @@ export type MembershipsModuleOrderBy = | 'ENTITY_IDS_BY_PERM_ASC' | 'ENTITY_IDS_BY_PERM_DESC' | 'ENTITY_IDS_FUNCTION_ASC' - | 'ENTITY_IDS_FUNCTION_DESC'; + | 'ENTITY_IDS_FUNCTION_DESC' + | 'MEMBER_PROFILES_TABLE_ID_ASC' + | 'MEMBER_PROFILES_TABLE_ID_DESC'; /** Methods to use when ordering `PermissionsModule`. */ export type PermissionsModuleOrderBy = | 'NATURAL' @@ -1640,10 +1676,10 @@ export type UserAuthModuleOrderBy = | 'SEND_ACCOUNT_DELETION_EMAIL_FUNCTION_DESC' | 'DELETE_ACCOUNT_FUNCTION_ASC' | 'DELETE_ACCOUNT_FUNCTION_DESC' - | 'SIGN_IN_ONE_TIME_TOKEN_FUNCTION_ASC' - | 'SIGN_IN_ONE_TIME_TOKEN_FUNCTION_DESC' - | 'ONE_TIME_TOKEN_FUNCTION_ASC' - | 'ONE_TIME_TOKEN_FUNCTION_DESC' + | 'SIGN_IN_CROSS_ORIGIN_FUNCTION_ASC' + | 'SIGN_IN_CROSS_ORIGIN_FUNCTION_DESC' + | 'REQUEST_CROSS_ORIGIN_TOKEN_FUNCTION_ASC' + | 'REQUEST_CROSS_ORIGIN_TOKEN_FUNCTION_DESC' | 'EXTEND_TOKEN_EXPIRES_ASC' | 'EXTEND_TOKEN_EXPIRES_DESC'; /** Methods to use when ordering `UsersModule`. */ @@ -1811,6 +1847,64 @@ export type StorageModuleOrderBy = | 'MAX_FILENAME_LENGTH_DESC' | 'CACHE_TTL_SECONDS_ASC' | 'CACHE_TTL_SECONDS_DESC'; +/** Methods to use when ordering `EntityTypeProvision`. */ +export type EntityTypeProvisionOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PARENT_ENTITY_ASC' + | 'PARENT_ENTITY_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'IS_VISIBLE_ASC' + | 'IS_VISIBLE_DESC' + | 'HAS_LIMITS_ASC' + | 'HAS_LIMITS_DESC' + | 'HAS_PROFILES_ASC' + | 'HAS_PROFILES_DESC' + | 'HAS_LEVELS_ASC' + | 'HAS_LEVELS_DESC' + | 'SKIP_ENTITY_POLICIES_ASC' + | 'SKIP_ENTITY_POLICIES_DESC' + | 'TABLE_PROVISION_ASC' + | 'TABLE_PROVISION_DESC' + | 'OUT_MEMBERSHIP_TYPE_ASC' + | 'OUT_MEMBERSHIP_TYPE_DESC' + | 'OUT_ENTITY_TABLE_ID_ASC' + | 'OUT_ENTITY_TABLE_ID_DESC' + | 'OUT_ENTITY_TABLE_NAME_ASC' + | 'OUT_ENTITY_TABLE_NAME_DESC' + | 'OUT_INSTALLED_MODULES_ASC' + | 'OUT_INSTALLED_MODULES_DESC'; +/** Methods to use when ordering `WebauthnCredentialsModule`. */ +export type WebauthnCredentialsModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; /** Methods to use when ordering `DatabaseProvisionModule`. */ export type DatabaseProvisionModuleOrderBy = | 'NATURAL' @@ -1941,6 +2035,8 @@ export type OrgMembershipOrderBy = | 'IS_DISABLED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -1953,6 +2049,8 @@ export type OrgMembershipOrderBy = | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' | 'PROFILE_ID_ASC' | 'PROFILE_ID_DESC'; /** Methods to use when ordering `OrgMember`. */ @@ -2006,6 +2104,33 @@ export type OrgOwnerGrantOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +/** Methods to use when ordering `OrgMemberProfile`. */ +export type OrgMemberProfileOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'BIO_ASC' + | 'BIO_DESC' + | 'PROFILE_PICTURE_ASC' + | 'PROFILE_PICTURE_DESC'; /** Methods to use when ordering `OrgGrant`. */ export type OrgGrantOrderBy = | 'NATURAL' @@ -2226,27 +2351,6 @@ export type CryptoAddressOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -/** Methods to use when ordering `ConnectedAccount`. */ -export type ConnectedAccountOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SERVICE_ASC' - | 'SERVICE_DESC' - | 'IDENTIFIER_ASC' - | 'IDENTIFIER_DESC' - | 'DETAILS_ASC' - | 'DETAILS_DESC' - | 'IS_VERIFIED_ASC' - | 'IS_VERIFIED_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; /** Methods to use when ordering `AppInvite`. */ export type AppInviteOrderBy = | 'NATURAL' @@ -2445,19 +2549,44 @@ export type OrgLimitDefaultOrderBy = | 'NAME_DESC' | 'MAX_ASC' | 'MAX_DESC'; -/** Methods to use when ordering `MembershipType`. */ -export type MembershipTypeOrderBy = +/** Methods to use when ordering `DevicesModule`. */ +export type DevicesModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'DESCRIPTION_ASC' - | 'DESCRIPTION_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC'; + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'USER_DEVICES_TABLE_ID_ASC' + | 'USER_DEVICES_TABLE_ID_DESC' + | 'DEVICE_SETTINGS_TABLE_ID_ASC' + | 'DEVICE_SETTINGS_TABLE_ID_DESC' + | 'USER_DEVICES_TABLE_ASC' + | 'USER_DEVICES_TABLE_DESC' + | 'DEVICE_SETTINGS_TABLE_ASC' + | 'DEVICE_SETTINGS_TABLE_DESC'; +/** Methods to use when ordering `UserConnectedAccount`. */ +export type UserConnectedAccountOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SERVICE_ASC' + | 'SERVICE_DESC' + | 'IDENTIFIER_ASC' + | 'IDENTIFIER_DESC' + | 'DETAILS_ASC' + | 'DETAILS_DESC' + | 'IS_VERIFIED_ASC' + | 'IS_VERIFIED_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; /** Methods to use when ordering `Object`. */ export type ObjectOrderBy = | 'NATURAL' @@ -2572,6 +2701,23 @@ export type RateLimitsModuleOrderBy = | 'IP_RATE_LIMITS_TABLE_DESC' | 'RATE_LIMITS_TABLE_ASC' | 'RATE_LIMITS_TABLE_DESC'; +/** Methods to use when ordering `MembershipType`. */ +export type MembershipTypeOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PARENT_MEMBERSHIP_TYPE_ASC' + | 'PARENT_MEMBERSHIP_TYPE_DESC' + | 'HAS_USERS_TABLE_ENTRY_ASC' + | 'HAS_USERS_TABLE_ENTRY_DESC'; /** Methods to use when ordering `OrgMembershipDefault`. */ export type OrgMembershipDefaultOrderBy = | 'NATURAL' @@ -2753,6 +2899,8 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -2984,6 +3132,10 @@ export interface DatabaseFilter { embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: DatabaseToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `databaseTransfers` relation. */ databaseTransfers?: DatabaseToManyDatabaseTransferFilter; /** `databaseTransfers` exist. */ @@ -3108,10 +3260,6 @@ export interface DatabaseFilter { hierarchyModule?: HierarchyModuleFilter; /** A related `hierarchyModule` exists. */ hierarchyModuleExists?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: DatabaseToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: DatabaseToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -3132,10 +3280,26 @@ export interface DatabaseFilter { storageModules?: DatabaseToManyStorageModuleFilter; /** `storageModules` exist. */ storageModulesExist?: boolean; + /** Filter by the object’s `entityTypeProvisions` relation. */ + entityTypeProvisions?: DatabaseToManyEntityTypeProvisionFilter; + /** `entityTypeProvisions` exist. */ + entityTypeProvisionsExist?: boolean; /** Filter by the object’s `rateLimitsModule` relation. */ rateLimitsModule?: RateLimitsModuleFilter; /** A related `rateLimitsModule` exists. */ rateLimitsModuleExists?: boolean; + /** Filter by the object’s `devicesModule` relation. */ + devicesModule?: DevicesModuleFilter; + /** A related `devicesModule` exists. */ + devicesModuleExists?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: DatabaseToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; + /** Filter by the object’s `webauthnCredentialsModules` relation. */ + webauthnCredentialsModules?: DatabaseToManyWebauthnCredentialsModuleFilter; + /** `webauthnCredentialsModules` exist. */ + webauthnCredentialsModulesExist?: boolean; /** Filter by the object’s `databaseProvisionModules` relation. */ databaseProvisionModules?: DatabaseToManyDatabaseProvisionModuleFilter; /** `databaseProvisionModules` exist. */ @@ -3243,6 +3407,14 @@ export interface UserFilter { orgOwnerGrantsByGrantorId?: UserToManyOrgOwnerGrantFilter; /** `orgOwnerGrantsByGrantorId` exist. */ orgOwnerGrantsByGrantorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByActorId` relation. */ + orgMemberProfilesByActorId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByActorId` exist. */ + orgMemberProfilesByActorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByEntityId` relation. */ + orgMemberProfilesByEntityId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByEntityId` exist. */ + orgMemberProfilesByEntityIdExist?: boolean; /** Filter by the object’s `orgGrantsByActorId` relation. */ orgGrantsByActorId?: UserToManyOrgGrantFilter; /** `orgGrantsByActorId` exist. */ @@ -3323,10 +3495,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `appInvitesBySenderId` relation. */ appInvitesBySenderId?: UserToManyAppInviteFilter; /** `appInvitesBySenderId` exist. */ @@ -3546,6 +3714,8 @@ export interface AppMembershipFilter { isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -3706,6 +3876,8 @@ export interface OrgMembershipFilter { isDisabled?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -3718,6 +3890,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ @@ -3730,6 +3904,47 @@ export interface OrgMembershipFilter { actor?: UserFilter; /** Filter by the object’s `entity` relation. */ entity?: UserFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; +} +/** A filter to be used against `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMemberProfileFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Filter by the object’s `actor` relation. */ + actor?: UserFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; } /** A filter to be used against `OrgMembershipDefault` object types. All fields are combined with a logical ‘and.’ */ export interface OrgMembershipDefaultFilter { @@ -3870,6 +4085,15 @@ export interface OrgOwnerGrantFilter { /** A related `grantor` exists. */ grantorExists?: boolean; } +/** A filter to be used against many `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyOrgMemberProfileFilter { + /** Filters to entities where at least one related entity matches. */ + some?: OrgMemberProfileFilter; + /** Filters to entities where every related entity matches. */ + every?: OrgMemberProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgMemberProfileFilter; +} /** A filter to be used against many `OrgGrant` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyOrgGrantFilter { /** Filters to entities where at least one related entity matches. */ @@ -4373,42 +4597,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -/** A filter to be used against many `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface UserToManyConnectedAccountFilter { - /** Filters to entities where at least one related entity matches. */ - some?: ConnectedAccountFilter; - /** Filters to entities where every related entity matches. */ - every?: ConnectedAccountFilter; - /** Filters to entities where no related entity matches. */ - none?: ConnectedAccountFilter; -} -/** A filter to be used against `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} /** A filter to be used against many `AppInvite` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyAppInviteFilter { /** Filters to entities where at least one related entity matches. */ @@ -4765,14 +4953,10 @@ export interface SchemaFilter { apiSchemas?: SchemaToManyApiSchemaFilter; /** `apiSchemas` exist. */ apiSchemasExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByPrivateSchemaId` relation. */ - tableTemplateModulesByPrivateSchemaId?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByPrivateSchemaId` exist. */ - tableTemplateModulesByPrivateSchemaIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: SchemaToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } /** A filter to be used against many `Table` object types. All fields are combined with a logical ‘and.’ */ export interface SchemaToManyTableFilter { @@ -4893,14 +5077,14 @@ export interface TableFilter { embeddingChunks?: TableToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByOwnerTableId` relation. */ - tableTemplateModulesByOwnerTableId?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByOwnerTableId` exist. */ - tableTemplateModulesByOwnerTableIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefTableId` relation. */ + spatialRelationsByRefTableId?: TableToManySpatialRelationFilter; + /** `spatialRelationsByRefTableId` exist. */ + spatialRelationsByRefTableIdExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: TableToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: TableToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -4913,6 +5097,14 @@ export interface TableFilter { relationProvisionsByTargetTableId?: TableToManyRelationProvisionFilter; /** `relationProvisionsByTargetTableId` exist. */ relationProvisionsByTargetTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModulesBySessionsTableId` relation. */ + sessionSecretsModulesBySessionsTableId?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModulesBySessionsTableId` exist. */ + sessionSecretsModulesBySessionsTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } /** A filter to be used against many `CheckConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface TableToManyCheckConstraintFilter { @@ -4992,38 +5184,104 @@ export interface FieldFilter { database?: DatabaseFilter; /** Filter by the object’s `table` relation. */ table?: TableFilter; -} -/** A filter to be used against many `ForeignKeyConstraint` object types. All fields are combined with a logical ‘and.’ */ -export interface TableToManyForeignKeyConstraintFilter { + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: FieldToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefFieldId` relation. */ + spatialRelationsByRefFieldId?: FieldToManySpatialRelationFilter; + /** `spatialRelationsByRefFieldId` exist. */ + spatialRelationsByRefFieldIdExist?: boolean; +} +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface FieldToManySpatialRelationFilter { /** Filters to entities where at least one related entity matches. */ - some?: ForeignKeyConstraintFilter; + some?: SpatialRelationFilter; /** Filters to entities where every related entity matches. */ - every?: ForeignKeyConstraintFilter; + every?: SpatialRelationFilter; /** Filters to entities where no related entity matches. */ - none?: ForeignKeyConstraintFilter; + none?: SpatialRelationFilter; } -/** A filter to be used against `ForeignKeyConstraint` object types. All fields are combined with a logical ‘and.’ */ -export interface ForeignKeyConstraintFilter { +/** A filter to be used against `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface SpatialRelationFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; /** Filter by the object’s `databaseId` field. */ databaseId?: UUIDFilter; /** Filter by the object’s `tableId` field. */ tableId?: UUIDFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `smartTags` field. */ - smartTags?: JSONFilter; - /** Filter by the object’s `type` field. */ - type?: StringFilter; - /** Filter by the object’s `fieldIds` field. */ - fieldIds?: UUIDListFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; /** Filter by the object’s `refTableId` field. */ refTableId?: UUIDFilter; - /** Filter by the object’s `refFieldIds` field. */ - refFieldIds?: UUIDListFilter; + /** Filter by the object’s `refFieldId` field. */ + refFieldId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `operator` field. */ + operator?: StringFilter; + /** Filter by the object’s `paramName` field. */ + paramName?: StringFilter; + /** Filter by the object’s `category` field. */ + category?: ObjectCategoryFilter; + /** Filter by the object’s `module` field. */ + module?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: IntFilter; + /** Filter by the object’s `tags` field. */ + tags?: StringListFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: SpatialRelationFilter[]; + /** Checks for any expressions in this list. */ + or?: SpatialRelationFilter[]; + /** Negates the expression. */ + not?: SpatialRelationFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `field` relation. */ + field?: FieldFilter; + /** Filter by the object’s `refField` relation. */ + refField?: FieldFilter; + /** Filter by the object’s `refTable` relation. */ + refTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} +/** A filter to be used against many `ForeignKeyConstraint` object types. All fields are combined with a logical ‘and.’ */ +export interface TableToManyForeignKeyConstraintFilter { + /** Filters to entities where at least one related entity matches. */ + some?: ForeignKeyConstraintFilter; + /** Filters to entities where every related entity matches. */ + every?: ForeignKeyConstraintFilter; + /** Filters to entities where no related entity matches. */ + none?: ForeignKeyConstraintFilter; +} +/** A filter to be used against `ForeignKeyConstraint` object types. All fields are combined with a logical ‘and.’ */ +export interface ForeignKeyConstraintFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `smartTags` field. */ + smartTags?: JSONFilter; + /** Filter by the object’s `type` field. */ + type?: StringFilter; + /** Filter by the object’s `fieldIds` field. */ + fieldIds?: UUIDListFilter; + /** Filter by the object’s `refTableId` field. */ + refTableId?: UUIDFilter; + /** Filter by the object’s `refFieldIds` field. */ + refFieldIds?: UUIDListFilter; /** Filter by the object’s `deleteAction` field. */ deleteAction?: StringFilter; /** Filter by the object’s `updateAction` field. */ @@ -5644,51 +5902,14 @@ export interface EmbeddingChunkFilter { /** Filter by the object’s `table` relation. */ table?: TableFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface TableToManyTableTemplateModuleFilter { +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface TableToManySpatialRelationFilter { /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; + some?: SpatialRelationFilter; /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; + every?: SpatialRelationFilter; /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; -} -/** A filter to be used against `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface TableTemplateModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `ownerTableId` field. */ - ownerTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; - /** Filter by the object’s `nodeType` field. */ - nodeType?: StringFilter; - /** Filter by the object’s `data` field. */ - data?: JSONFilter; - /** Checks for all expressions in this list. */ - and?: TableTemplateModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: TableTemplateModuleFilter[]; - /** Negates the expression. */ - not?: TableTemplateModuleFilter; - /** Filter by the object’s `database` relation. */ - database?: DatabaseFilter; - /** Filter by the object’s `ownerTable` relation. */ - ownerTable?: TableFilter; - /** Filter by the object’s `privateSchema` relation. */ - privateSchema?: SchemaFilter; - /** Filter by the object’s `schema` relation. */ - schema?: SchemaFilter; - /** Filter by the object’s `table` relation. */ - table?: TableFilter; + none?: SpatialRelationFilter; } /** A filter to be used against many `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface TableToManySecureTableProvisionFilter { @@ -5871,6 +6092,44 @@ export interface RelationProvisionFilter { /** Filter by the object’s `targetTable` relation. */ targetTable?: TableFilter; } +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface TableToManySessionSecretsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SessionSecretsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: SessionSecretsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: SessionSecretsModuleFilter; +} +/** A filter to be used against `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SessionSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: SessionSecretsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: SessionSecretsModuleFilter[]; + /** Negates the expression. */ + not?: SessionSecretsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `sessionsTable` relation. */ + sessionsTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} /** A filter to be used against many `SchemaGrant` object types. All fields are combined with a logical ‘and.’ */ export interface SchemaToManySchemaGrantFilter { /** Filters to entities where at least one related entity matches. */ @@ -6558,14 +6817,14 @@ export interface SiteThemeFilter { /** Filter by the object’s `site` relation. */ site?: SiteFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface SchemaToManyTableTemplateModuleFilter { +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SchemaToManySessionSecretsModuleFilter { /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; + some?: SessionSecretsModuleFilter; /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; + every?: SessionSecretsModuleFilter; /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; + none?: SessionSecretsModuleFilter; } /** A filter to be used against many `Table` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManyTableFilter { @@ -6761,6 +7020,15 @@ export interface DatabaseToManyEmbeddingChunkFilter { /** Filters to entities where no related entity matches. */ none?: EmbeddingChunkFilter; } +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManySpatialRelationFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SpatialRelationFilter; + /** Filters to entities where every related entity matches. */ + every?: SpatialRelationFilter; + /** Filters to entities where no related entity matches. */ + none?: SpatialRelationFilter; +} /** A filter to be used against many `DatabaseTransfer` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManyDatabaseTransferFilter { /** Filters to entities where at least one related entity matches. */ @@ -7517,6 +7785,8 @@ export interface MembershipsModuleFilter { entityIdsByPerm?: StringFilter; /** Filter by the object’s `entityIdsFunction` field. */ entityIdsFunction?: StringFilter; + /** Filter by the object’s `memberProfilesTableId` field. */ + memberProfilesTableId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: MembershipsModuleFilter[]; /** Checks for any expressions in this list. */ @@ -7976,10 +8246,10 @@ export interface UserAuthModuleFilter { sendAccountDeletionEmailFunction?: StringFilter; /** Filter by the object’s `deleteAccountFunction` field. */ deleteAccountFunction?: StringFilter; - /** Filter by the object’s `signInOneTimeTokenFunction` field. */ - signInOneTimeTokenFunction?: StringFilter; - /** Filter by the object’s `oneTimeTokenFunction` field. */ - oneTimeTokenFunction?: StringFilter; + /** Filter by the object’s `signInCrossOriginFunction` field. */ + signInCrossOriginFunction?: StringFilter; + /** Filter by the object’s `requestCrossOriginTokenFunction` field. */ + requestCrossOriginTokenFunction?: StringFilter; /** Filter by the object’s `extendTokenExpires` field. */ extendTokenExpires?: StringFilter; /** Checks for all expressions in this list. */ @@ -8110,15 +8380,6 @@ export interface HierarchyModuleFilter { /** Filter by the object’s `usersTable` relation. */ usersTable?: TableFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface DatabaseToManyTableTemplateModuleFilter { - /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; - /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; - /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; -} /** A filter to be used against many `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManySecureTableProvisionFilter { /** Filters to entities where at least one related entity matches. */ @@ -8395,6 +8656,60 @@ export interface StorageModuleFilter { /** Filter by the object’s `uploadRequestsTable` relation. */ uploadRequestsTable?: TableFilter; } +/** A filter to be used against many `EntityTypeProvision` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManyEntityTypeProvisionFilter { + /** Filters to entities where at least one related entity matches. */ + some?: EntityTypeProvisionFilter; + /** Filters to entities where every related entity matches. */ + every?: EntityTypeProvisionFilter; + /** Filters to entities where no related entity matches. */ + none?: EntityTypeProvisionFilter; +} +/** A filter to be used against `EntityTypeProvision` object types. All fields are combined with a logical ‘and.’ */ +export interface EntityTypeProvisionFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `parentEntity` field. */ + parentEntity?: StringFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `isVisible` field. */ + isVisible?: BooleanFilter; + /** Filter by the object’s `hasLimits` field. */ + hasLimits?: BooleanFilter; + /** Filter by the object’s `hasProfiles` field. */ + hasProfiles?: BooleanFilter; + /** Filter by the object’s `hasLevels` field. */ + hasLevels?: BooleanFilter; + /** Filter by the object’s `skipEntityPolicies` field. */ + skipEntityPolicies?: BooleanFilter; + /** Filter by the object’s `tableProvision` field. */ + tableProvision?: JSONFilter; + /** Filter by the object’s `outMembershipType` field. */ + outMembershipType?: IntFilter; + /** Filter by the object’s `outEntityTableId` field. */ + outEntityTableId?: UUIDFilter; + /** Filter by the object’s `outEntityTableName` field. */ + outEntityTableName?: StringFilter; + /** Filter by the object’s `outInstalledModules` field. */ + outInstalledModules?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: EntityTypeProvisionFilter[]; + /** Checks for any expressions in this list. */ + or?: EntityTypeProvisionFilter[]; + /** Negates the expression. */ + not?: EntityTypeProvisionFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; +} /** A filter to be used against `RateLimitsModule` object types. All fields are combined with a logical ‘and.’ */ export interface RateLimitsModuleFilter { /** Filter by the object’s `id` field. */ @@ -8432,6 +8747,88 @@ export interface RateLimitsModuleFilter { /** Filter by the object’s `schema` relation. */ schema?: SchemaFilter; } +/** A filter to be used against `DevicesModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DevicesModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `userDevicesTableId` field. */ + userDevicesTableId?: UUIDFilter; + /** Filter by the object’s `deviceSettingsTableId` field. */ + deviceSettingsTableId?: UUIDFilter; + /** Filter by the object’s `userDevicesTable` field. */ + userDevicesTable?: StringFilter; + /** Filter by the object’s `deviceSettingsTable` field. */ + deviceSettingsTable?: StringFilter; + /** Checks for all expressions in this list. */ + and?: DevicesModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: DevicesModuleFilter[]; + /** Negates the expression. */ + not?: DevicesModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `deviceSettingsTableByDeviceSettingsTableId` relation. */ + deviceSettingsTableByDeviceSettingsTableId?: TableFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `userDevicesTableByUserDevicesTableId` relation. */ + userDevicesTableByUserDevicesTableId?: TableFilter; +} +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManySessionSecretsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SessionSecretsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: SessionSecretsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: SessionSecretsModuleFilter; +} +/** A filter to be used against many `WebauthnCredentialsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManyWebauthnCredentialsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: WebauthnCredentialsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: WebauthnCredentialsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: WebauthnCredentialsModuleFilter; +} +/** A filter to be used against `WebauthnCredentialsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface WebauthnCredentialsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: WebauthnCredentialsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: WebauthnCredentialsModuleFilter[]; + /** Negates the expression. */ + not?: WebauthnCredentialsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `ownerTable` relation. */ + ownerTable?: TableFilter; + /** Filter by the object’s `privateSchema` relation. */ + privateSchema?: SchemaFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} /** A filter to be used against many `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManyDatabaseProvisionModuleFilter { /** Filters to entities where at least one related entity matches. */ @@ -8613,22 +9010,30 @@ export interface OrgLimitDefaultFilter { /** Negates the expression. */ not?: OrgLimitDefaultFilter; } -/** A filter to be used against `MembershipType` object types. All fields are combined with a logical ‘and.’ */ -export interface MembershipTypeFilter { +/** A filter to be used against `UserConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ +export interface UserConnectedAccountFilter { /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; + id?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `service` field. */ + service?: StringFilter; + /** Filter by the object’s `identifier` field. */ + identifier?: StringFilter; + /** Filter by the object’s `details` field. */ + details?: JSONFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; /** Checks for all expressions in this list. */ - and?: MembershipTypeFilter[]; + and?: UserConnectedAccountFilter[]; /** Checks for any expressions in this list. */ - or?: MembershipTypeFilter[]; + or?: UserConnectedAccountFilter[]; /** Negates the expression. */ - not?: MembershipTypeFilter; + not?: UserConnectedAccountFilter; } /** A filter to be used against `Object` object types. All fields are combined with a logical ‘and.’ */ export interface ObjectFilter { @@ -8741,6 +9146,27 @@ export interface CommitFilter { /** Negates the expression. */ not?: CommitFilter; } +/** A filter to be used against `MembershipType` object types. All fields are combined with a logical ‘and.’ */ +export interface MembershipTypeFilter { + /** Filter by the object’s `id` field. */ + id?: IntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `parentMembershipType` field. */ + parentMembershipType?: IntFilter; + /** Filter by the object’s `hasUsersTableEntry` field. */ + hasUsersTableEntry?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: MembershipTypeFilter[]; + /** Checks for any expressions in this list. */ + or?: MembershipTypeFilter[]; + /** Negates the expression. */ + not?: MembershipTypeFilter; +} /** A filter to be used against `AppLevelRequirement` object types. All fields are combined with a logical ‘and.’ */ export interface AppLevelRequirementFilter { /** Filter by the object’s `id` field. */ @@ -8852,6 +9278,18 @@ export interface RejectDatabaseTransferInput { clientMutationId?: string; transferId?: string; } +export interface DisconnectAccountInput { + clientMutationId?: string; + accountId: string; +} +export interface RevokeApiKeyInput { + clientMutationId?: string; + keyId: string; +} +export interface RevokeSessionInput { + clientMutationId?: string; + sessionId: string; +} export interface VerifyPasswordInput { clientMutationId?: string; password: string; @@ -8902,6 +9340,11 @@ export interface ConstructBlueprintInput { blueprintId?: string; schemaId?: string; } +export interface ProvisionNewUserInput { + clientMutationId?: string; + email?: string; + password?: string; +} export interface ResetPasswordInput { clientMutationId?: string; roleId?: string; @@ -8922,10 +9365,27 @@ export interface CopyTemplateToBlueprintInput { nameOverride?: string; displayNameOverride?: string; } -export interface BootstrapUserInput { +export interface CreateApiKeyInput { clientMutationId?: string; - targetDatabaseId?: string; - password?: string; + keyName: string; + accessLevel?: string; + mfaLevel?: string; +} +export interface ProvisionSpatialRelationInput { + clientMutationId?: string; + pDatabaseId?: string; + pSourceTableId?: string; + pSourceFieldId?: string; + pTargetTableId?: string; + pTargetFieldId?: string; + pName?: string; + pOperator?: string; + pParamName?: string; +} +export interface BootstrapUserInput { + clientMutationId?: string; + targetDatabaseId?: string; + password?: string; isAdmin?: boolean; isOwner?: boolean; username?: string; @@ -9038,7 +9498,7 @@ export interface ApplyRlsInput { permissive?: boolean; name?: string; } -export interface SignInOneTimeTokenInput { +export interface SignInCrossOriginInput { clientMutationId?: string; token?: string; credentialKind?: string; @@ -9057,7 +9517,7 @@ export interface ExtendTokenExpiresInput { clientMutationId?: string; amount?: IntervalInput; } -export interface SignInInput { +export interface SignUpInput { clientMutationId?: string; email?: string; password?: string; @@ -9065,20 +9525,21 @@ export interface SignInInput { credentialKind?: string; csrfToken?: string; } -export interface SignUpInput { +export interface RequestCrossOriginTokenInput { clientMutationId?: string; email?: string; password?: string; + origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; - credentialKind?: string; - csrfToken?: string; } -export interface OneTimeTokenInput { +export interface SignInInput { clientMutationId?: string; email?: string; password?: string; - origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; + credentialKind?: string; + csrfToken?: string; + deviceToken?: string; } export interface ProvisionTableInput { clientMutationId?: string; @@ -9358,6 +9819,21 @@ export interface ViewRuleInput { /** NOTHING (for read-only) or custom action */ action?: string; } +export interface CreateSessionSecretsModuleInput { + clientMutationId?: string; + /** The `SessionSecretsModule` to be created by this mutation. */ + sessionSecretsModule: SessionSecretsModuleInput; +} +/** An input for mutations affecting `SessionSecretsModule` */ +export interface SessionSecretsModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + tableId?: string; + tableName?: string; + /** Resolved reference to sessions_module.sessions_table, used to FK session_secrets.session_id with ON DELETE CASCADE. */ + sessionsTableId?: string; +} export interface CreateAppAdminGrantInput { clientMutationId?: string; /** The `AppAdminGrant` to be created by this mutation. */ @@ -9494,6 +9970,21 @@ export interface ConnectedAccountsModuleInput { ownerTableId?: string; tableName: string; } +export interface CreateDevicesModuleInput { + clientMutationId?: string; + /** The `DevicesModule` to be created by this mutation. */ + devicesModule: DevicesModuleInput; +} +/** An input for mutations affecting `DevicesModule` */ +export interface DevicesModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + userDevicesTableId?: string; + deviceSettingsTableId?: string; + userDevicesTable?: string; + deviceSettingsTable?: string; +} export interface CreateEmailsModuleInput { clientMutationId?: string; /** The `EmailsModule` to be created by this mutation. */ @@ -9539,6 +10030,22 @@ export interface UsersModuleInput { typeTableId?: string; typeTableName?: string; } +export interface CreateWebauthnCredentialsModuleInput { + clientMutationId?: string; + /** The `WebauthnCredentialsModule` to be created by this mutation. */ + webauthnCredentialsModule: WebauthnCredentialsModuleInput; +} +/** An input for mutations affecting `WebauthnCredentialsModule` */ +export interface WebauthnCredentialsModuleInput { + id?: string; + databaseId: string; + schemaId?: string; + /** Reserved for future SECURITY DEFINER helpers on webauthn_credentials; unused in Phase 11a. */ + privateSchemaId?: string; + tableId?: string; + ownerTableId?: string; + tableName?: string; +} export interface CreateOrgAdminGrantInput { clientMutationId?: string; /** The `OrgAdminGrant` to be created by this mutation. */ @@ -9593,21 +10100,21 @@ export interface CryptoAddressInput { createdAt?: string; updatedAt?: string; } -export interface CreateMembershipTypeInput { +export interface CreateUserConnectedAccountInput { clientMutationId?: string; - /** The `MembershipType` to be created by this mutation. */ - membershipType: MembershipTypeInput; + /** The `UserConnectedAccount` to be created by this mutation. */ + userConnectedAccount: UserConnectedAccountInput; } -/** An input for mutations affecting `MembershipType` */ -export interface MembershipTypeInput { - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; - /** Human-readable name of the membership type */ - name: string; - /** Description of what this membership type represents */ - description: string; - /** Short prefix used to namespace tables and functions for this membership scope */ - prefix: string; +/** An input for mutations affecting `UserConnectedAccount` */ +export interface UserConnectedAccountInput { + id?: string; + ownerId?: string; + service?: string; + identifier?: string; + details?: unknown; + isVerified?: boolean; + createdAt?: string; + updatedAt?: string; } export interface CreateObjectInput { clientMutationId?: string; @@ -9656,26 +10163,6 @@ export interface CryptoAddressesModuleInput { tableName: string; cryptoNetwork?: string; } -export interface CreateConnectedAccountInput { - clientMutationId?: string; - /** The `ConnectedAccount` to be created by this mutation. */ - connectedAccount: ConnectedAccountInput; -} -/** An input for mutations affecting `ConnectedAccount` */ -export interface ConnectedAccountInput { - id?: string; - ownerId?: string; - /** The service used, e.g. `twitter` or `github`. */ - service: string; - /** A unique identifier for the user within the service */ - identifier: string; - /** Additional profile details extracted from this login method */ - details: unknown; - /** Whether this connected account has been verified */ - isVerified?: boolean; - createdAt?: string; - updatedAt?: string; -} export interface CreatePhoneNumberInput { clientMutationId?: string; /** The `PhoneNumber` to be created by this mutation. */ @@ -9908,23 +10395,6 @@ export interface RateLimitsModuleInput { ipRateLimitsTable?: string; rateLimitsTable?: string; } -export interface CreateTableTemplateModuleInput { - clientMutationId?: string; - /** The `TableTemplateModule` to be created by this mutation. */ - tableTemplateModule: TableTemplateModuleInput; -} -/** An input for mutations affecting `TableTemplateModule` */ -export interface TableTemplateModuleInput { - id?: string; - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - tableId?: string; - ownerTableId?: string; - tableName: string; - nodeType: string; - data?: unknown; -} export interface CreateOrgChartEdgeGrantInput { clientMutationId?: string; /** The `OrgChartEdgeGrant` to be created by this mutation. */ @@ -9968,6 +10438,26 @@ export interface OrgLimitInput { max?: number; entityId: string; } +export interface CreateMembershipTypeInput { + clientMutationId?: string; + /** The `MembershipType` to be created by this mutation. */ + membershipType: MembershipTypeInput; +} +/** An input for mutations affecting `MembershipType` */ +export interface MembershipTypeInput { + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; + /** Human-readable name of the membership type */ + name: string; + /** Description of what this membership type represents */ + description: string; + /** Short prefix used to namespace tables and functions for this membership scope */ + prefix: string; + /** Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) */ + parentMembershipType?: number; + /** When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs */ + hasUsersTableEntry?: boolean; +} export interface CreateDomainInput { clientMutationId?: string; /** The `Domain` to be created by this mutation. */ @@ -10287,6 +10777,33 @@ export interface DenormalizedTableFieldInput { funcName?: string; funcOrder?: number; } +export interface CreateOrgMemberProfileInput { + clientMutationId?: string; + /** The `OrgMemberProfile` to be created by this mutation. */ + orgMemberProfile: OrgMemberProfileInput; +} +/** An input for mutations affecting `OrgMemberProfile` */ +export interface OrgMemberProfileInput { + id?: string; + createdAt?: string; + updatedAt?: string; + /** References the membership this profile belongs to (1:1) */ + membershipId: string; + /** References the entity this profile belongs to (used for RLS lookups) */ + entityId: string; + /** References the user who owns this profile (for self-edit RLS) */ + actorId: string; + /** Display name shown to other entity members */ + displayName?: string; + /** Email address visible to other entity members (auto-populated from verified primary email) */ + email?: string; + /** Job title or role description visible to other entity members */ + title?: string; + /** Short biography visible to other entity members */ + bio?: string; + /** Profile picture visible to other entity members */ + profilePicture?: ConstructiveInternalTypeImage; +} export interface CreateSqlActionInput { clientMutationId?: string; /** The `SqlAction` to be created by this mutation. */ @@ -10623,6 +11140,29 @@ export interface UniqueConstraintInput { createdAt?: string; updatedAt?: string; } +export interface CreateSpatialRelationInput { + clientMutationId?: string; + /** The `SpatialRelation` to be created by this mutation. */ + spatialRelation: SpatialRelationInput; +} +/** An input for mutations affecting `SpatialRelation` */ +export interface SpatialRelationInput { + id?: string; + databaseId?: string; + tableId: string; + fieldId: string; + refTableId: string; + refFieldId: string; + name: string; + operator: string; + paramName?: string; + category?: ObjectCategory; + module?: string; + scope?: number; + tags?: string[]; + createdAt?: string; + updatedAt?: string; +} export interface CreatePolicyInput { clientMutationId?: string; /** The `Policy` to be created by this mutation. */ @@ -10648,6 +11188,138 @@ export interface PolicyInput { createdAt?: string; updatedAt?: string; } +export interface CreateEntityTypeProvisionInput { + clientMutationId?: string; + /** The `EntityTypeProvision` to be created by this mutation. */ + entityTypeProvision: EntityTypeProvisionInput; +} +/** An input for mutations affecting `EntityTypeProvision` */ +export interface EntityTypeProvisionInput { + /** Unique identifier for this provision row. */ + id?: string; + /** The database to provision this entity type in. Required. */ + databaseId: string; + /** + * Human-readable name for this membership type, e.g. 'Data Room Member', 'Team Channel Member'. Required. + * Stored in the membership_types registry table. + */ + name: string; + /** + * SQL prefix used for table and module naming, e.g. 'data_room', 'team_channel'. Required. + * Drives entity table name (prefix || 's' by default), module labels (permissions_module:prefix), + * and membership table names (prefix_memberships, prefix_members, etc.). + * Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING. + */ + prefix: string; + /** Description of this membership type. Stored in the membership_types registry table. Defaults to empty string. */ + description?: string; + /** + * Prefix of the parent entity type. The trigger resolves this to a membership_type integer + * by looking up memberships_module WHERE prefix = parent_entity. + * Defaults to 'org' (the organization-level type). For nested types, set to the parent's prefix + * (e.g. 'data_room' for a team_channel nested under data_room). + * The parent type must already be provisioned before this INSERT. + */ + parentEntity?: string; + /** + * Override the entity table name. When NULL (default), the table name is derived as prefix || 's' + * (e.g. prefix 'data_room' produces table 'data_rooms'). + * Set this when the pluralization rule doesn't apply (e.g. prefix 'staff' should produce 'staff' not 'staffs'). + */ + tableName?: string; + /** + * Whether members of the parent entity can see child entities. Defaults to true. + * When true: a SELECT policy allows parent members to list child entities (e.g. org members can see all data rooms). + * When false: only direct members of the entity itself can see it (private entity mode). + * Controls whether the parent_member SELECT policy is created on the entity table. + * Only meaningful on the defaults path — ignored (no-op) when table_provision is non-NULL or + * skip_entity_policies=true, since no default policies are being applied in those cases. + */ + isVisible?: boolean; + /** + * Whether to apply limits_module security for this type. Defaults to false. + * The limits_module table structure is always created (memberships_module requires it), + * but when false, no RLS policies are applied to the limits tables. + * Set to true if this entity type needs configurable resource limits per membership. + */ + hasLimits?: boolean; + /** + * Whether to provision profiles_module for this type. Defaults to false. + * Profiles provide named permission roles (e.g. 'Editor', 'Viewer') with pre-configured permission bitmasks. + * When true, creates profile tables and applies profiles security. + */ + hasProfiles?: boolean; + /** + * Whether to provision levels_module for this type. Defaults to false. + * Levels provide gamification/achievement tracking for members. + * When true, creates level steps, achievements, and level tables with security. + */ + hasLevels?: boolean; + /** + * Escape hatch: when true, apply zero RLS policies to the entity table. Defaults to false. + * Use this only when you want the entity table provisioned with zero policies (e.g. because you + * plan to insert secure_table_provision rows yourself later). In most cases, prefer leaving this + * false and either accepting the five defaults (table_provision=NULL) or overriding them via + * table_provision. + * Defaults (applied when table_provision IS NULL and skip_entity_policies=false): + * - SELECT (parent_member): parent entity members can see child entities (only when is_visible=true) + * - SELECT (self_member): direct members of the entity can see it + * - INSERT: create_entity permission on the parent entity + * - UPDATE: admin_entity permission on the entity itself + * - DELETE: owner of the entity can delete it + */ + skipEntityPolicies?: boolean; + /** + * Single jsonb object describing the full security setup to apply to the entity table. + * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * entries, so an entity table is configured the same way an ordinary blueprint table is. + * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by + * table_provision.policies[] (is_visible becomes a no-op on this path). + * Recognized keys (all optional): + * - use_rls (boolean, default true) + * - nodes (jsonb array of {"$type","data"} Data* module entries) + * - fields (jsonb array of field objects: name,type,is_required,default,min,max,regexp,index) + * - grant_privileges (jsonb array of [privilege, columns] tuples) + * - grant_roles (jsonb array of role names; defaults to ["authenticated"]) + * - policies (jsonb array of policy objects; each with $type, privileges, data, name, role, permissive) + * The trigger fans policies[] into N secure_table_provision rows against the newly created entity table, + * with table-level setup (nodes/fields/grants) attached to the first row. + * Example — override with two SELECT policies: + * table_provision := jsonb_build_object( + * 'policies', jsonb_build_array( + * jsonb_build_object( + * '$type', 'AuthzEntityMembership', + * 'privileges', jsonb_build_array('select'), + * 'data', jsonb_build_object('entity_field', 'id', 'membership_type', 3), + * 'name', 'self_member' + * ), + * jsonb_build_object( + * '$type', 'AuthzDirectOwner', + * 'privileges', jsonb_build_array('select', 'update'), + * 'data', jsonb_build_object('owner_field', 'owner_id') + * ) + * ) + * ) + */ + tableProvision?: unknown; + /** + * Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning. + * This is the ID used in membership_types, memberships_module, and all module tables. + */ + outMembershipType?: number; + /** + * Output: the UUID of the created entity table. Populated by the trigger. + * Use this to reference the entity table in subsequent relation_provision or secure_table_provision rows. + */ + outEntityTableId?: string; + /** Output: the name of the created entity table (e.g. 'data_rooms'). Populated by the trigger. */ + outEntityTableName?: string; + /** + * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Populated by the trigger. Useful for verifying which modules were provisioned. + */ + outInstalledModules?: string[]; +} export interface CreatePermissionsModuleInput { clientMutationId?: string; /** The `PermissionsModule` to be created by this mutation. */ @@ -10702,74 +11374,6 @@ export interface AppInviteInput { createdAt?: string; updatedAt?: string; } -export interface CreateAppMembershipInput { - clientMutationId?: string; - /** The `AppMembership` to be created by this mutation. */ - appMembership: AppMembershipInput; -} -/** An input for mutations affecting `AppMembership` */ -export interface AppMembershipInput { - id?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: string; - updatedBy?: string; - /** Whether this membership has been approved by an admin */ - isApproved?: boolean; - /** Whether this member has been banned from the entity */ - isBanned?: boolean; - /** Whether this membership is temporarily disabled */ - isDisabled?: boolean; - /** Whether this member has been verified (e.g. email confirmation) */ - isVerified?: boolean; - /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ - isActive?: boolean; - /** Whether the actor is the owner of this entity */ - isOwner?: boolean; - /** Whether the actor has admin privileges on this entity */ - isAdmin?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ - granted?: string; - /** References the user who holds this membership */ - actorId: string; - profileId?: string; -} -export interface CreateOrgMembershipInput { - clientMutationId?: string; - /** The `OrgMembership` to be created by this mutation. */ - orgMembership: OrgMembershipInput; -} -/** An input for mutations affecting `OrgMembership` */ -export interface OrgMembershipInput { - id?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: string; - updatedBy?: string; - /** Whether this membership has been approved by an admin */ - isApproved?: boolean; - /** Whether this member has been banned from the entity */ - isBanned?: boolean; - /** Whether this membership is temporarily disabled */ - isDisabled?: boolean; - /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ - isActive?: boolean; - /** Whether the actor is the owner of this entity */ - isOwner?: boolean; - /** Whether the actor has admin privileges on this entity */ - isAdmin?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ - granted?: string; - /** References the user who holds this membership */ - actorId: string; - /** References the entity (org or group) this membership belongs to */ - entityId: string; - profileId?: string; -} export interface CreateEmbeddingChunkInput { clientMutationId?: string; /** The `EmbeddingChunk` to be created by this mutation. */ @@ -10870,30 +11474,66 @@ export interface ProfilesModuleInput { membershipsTableId?: string; prefix?: string; } -export interface CreateIndexInput { +export interface CreateAppMembershipInput { clientMutationId?: string; - /** The `Index` to be created by this mutation. */ - index: IndexInput; + /** The `AppMembership` to be created by this mutation. */ + appMembership: AppMembershipInput; } -/** An input for mutations affecting `Index` */ -export interface IndexInput { +/** An input for mutations affecting `AppMembership` */ +export interface AppMembershipInput { id?: string; - databaseId: string; - tableId: string; - name?: string; - fieldIds?: string[]; - includeFieldIds?: string[]; - accessMethod?: string; - indexParams?: unknown; - whereClause?: unknown; - isUnique?: boolean; - options?: unknown; - opClasses?: string[]; - smartTags?: unknown; - category?: ObjectCategory; - module?: string; - scope?: number; - tags?: string[]; + createdAt?: string; + updatedAt?: string; + createdBy?: string; + updatedBy?: string; + /** Whether this membership has been approved by an admin */ + isApproved?: boolean; + /** Whether this member has been banned from the entity */ + isBanned?: boolean; + /** Whether this membership is temporarily disabled */ + isDisabled?: boolean; + /** Whether this member has been verified (e.g. email confirmation) */ + isVerified?: boolean; + /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ + isActive?: boolean; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean; + /** Whether the actor is the owner of this entity */ + isOwner?: boolean; + /** Whether the actor has admin privileges on this entity */ + isAdmin?: boolean; + /** Aggregated permission bitmask combining profile-based and directly granted permissions */ + permissions?: string; + /** Bitmask of permissions directly granted to this member (not from profiles) */ + granted?: string; + /** References the user who holds this membership */ + actorId: string; + profileId?: string; +} +export interface CreateIndexInput { + clientMutationId?: string; + /** The `Index` to be created by this mutation. */ + index: IndexInput; +} +/** An input for mutations affecting `Index` */ +export interface IndexInput { + id?: string; + databaseId: string; + tableId: string; + name?: string; + fieldIds?: string[]; + includeFieldIds?: string[]; + accessMethod?: string; + indexParams?: unknown; + whereClause?: unknown; + isUnique?: boolean; + options?: unknown; + opClasses?: string[]; + smartTags?: unknown; + category?: ObjectCategory; + module?: string; + scope?: number; + tags?: string[]; createdAt?: string; updatedAt?: string; } @@ -10971,6 +11611,44 @@ export interface SecureTableProvisionInput { /** Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. */ outFields?: string[]; } +export interface CreateOrgMembershipInput { + clientMutationId?: string; + /** The `OrgMembership` to be created by this mutation. */ + orgMembership: OrgMembershipInput; +} +/** An input for mutations affecting `OrgMembership` */ +export interface OrgMembershipInput { + id?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: string; + updatedBy?: string; + /** Whether this membership has been approved by an admin */ + isApproved?: boolean; + /** Whether this member has been banned from the entity */ + isBanned?: boolean; + /** Whether this membership is temporarily disabled */ + isDisabled?: boolean; + /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ + isActive?: boolean; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean; + /** Whether the actor is the owner of this entity */ + isOwner?: boolean; + /** Whether the actor has admin privileges on this entity */ + isAdmin?: boolean; + /** Aggregated permission bitmask combining profile-based and directly granted permissions */ + permissions?: string; + /** Bitmask of permissions directly granted to this member (not from profiles) */ + granted?: string; + /** References the user who holds this membership */ + actorId: string; + /** References the entity (org or group) this membership belongs to */ + entityId: string; + /** Whether this member has read-only access (blocks mutations when true) */ + isReadOnly?: boolean; + profileId?: string; +} export interface CreateBlueprintTemplateInput { clientMutationId?: string; /** The `BlueprintTemplate` to be created by this mutation. */ @@ -11192,8 +11870,8 @@ export interface UserAuthModuleInput { checkPasswordFunction?: string; sendAccountDeletionEmailFunction?: string; deleteAccountFunction?: string; - signInOneTimeTokenFunction?: string; - oneTimeTokenFunction?: string; + signInCrossOriginFunction?: string; + requestCrossOriginTokenFunction?: string; extendTokenExpires?: string; } export interface CreateFieldInput { @@ -11414,6 +12092,7 @@ export interface MembershipsModuleInput { entityIdsByMask?: string; entityIdsByPerm?: string; entityIdsFunction?: string; + memberProfilesTableId?: string; } export interface UpdateDefaultIdsModuleInput { clientMutationId?: string; @@ -11694,6 +12373,22 @@ export interface ViewRulePatch { /** NOTHING (for read-only) or custom action */ action?: string; } +export interface UpdateSessionSecretsModuleInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `SessionSecretsModule` being updated. */ + sessionSecretsModulePatch: SessionSecretsModulePatch; +} +/** Represents an update to a `SessionSecretsModule`. Fields that are set will be updated. */ +export interface SessionSecretsModulePatch { + id?: string; + databaseId?: string; + schemaId?: string; + tableId?: string; + tableName?: string; + /** Resolved reference to sessions_module.sessions_table, used to FK session_secrets.session_id with ON DELETE CASCADE. */ + sessionsTableId?: string; +} export interface UpdateAppAdminGrantInput { clientMutationId?: string; id: string; @@ -11828,6 +12523,22 @@ export interface ConnectedAccountsModulePatch { ownerTableId?: string; tableName?: string; } +export interface UpdateDevicesModuleInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `DevicesModule` being updated. */ + devicesModulePatch: DevicesModulePatch; +} +/** Represents an update to a `DevicesModule`. Fields that are set will be updated. */ +export interface DevicesModulePatch { + id?: string; + databaseId?: string; + schemaId?: string; + userDevicesTableId?: string; + deviceSettingsTableId?: string; + userDevicesTable?: string; + deviceSettingsTable?: string; +} export interface UpdateEmailsModuleInput { clientMutationId?: string; id: string; @@ -11876,6 +12587,23 @@ export interface UsersModulePatch { typeTableId?: string; typeTableName?: string; } +export interface UpdateWebauthnCredentialsModuleInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `WebauthnCredentialsModule` being updated. */ + webauthnCredentialsModulePatch: WebauthnCredentialsModulePatch; +} +/** Represents an update to a `WebauthnCredentialsModule`. Fields that are set will be updated. */ +export interface WebauthnCredentialsModulePatch { + id?: string; + databaseId?: string; + schemaId?: string; + /** Reserved for future SECURITY DEFINER helpers on webauthn_credentials; unused in Phase 11a. */ + privateSchemaId?: string; + tableId?: string; + ownerTableId?: string; + tableName?: string; +} export interface UpdateOrgAdminGrantInput { clientMutationId?: string; id: string; @@ -11933,24 +12661,6 @@ export interface CryptoAddressPatch { createdAt?: string; updatedAt?: string; } -export interface UpdateMembershipTypeInput { - clientMutationId?: string; - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; - /** An object where the defined keys will be set on the `MembershipType` being updated. */ - membershipTypePatch: MembershipTypePatch; -} -/** Represents an update to a `MembershipType`. Fields that are set will be updated. */ -export interface MembershipTypePatch { - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id?: number; - /** Human-readable name of the membership type */ - name?: string; - /** Description of what this membership type represents */ - description?: string; - /** Short prefix used to namespace tables and functions for this membership scope */ - prefix?: string; -} export interface UpdateObjectInput { clientMutationId?: string; id: string; @@ -12002,27 +12712,6 @@ export interface CryptoAddressesModulePatch { tableName?: string; cryptoNetwork?: string; } -export interface UpdateConnectedAccountInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `ConnectedAccount` being updated. */ - connectedAccountPatch: ConnectedAccountPatch; -} -/** Represents an update to a `ConnectedAccount`. Fields that are set will be updated. */ -export interface ConnectedAccountPatch { - id?: string; - ownerId?: string; - /** The service used, e.g. `twitter` or `github`. */ - service?: string; - /** A unique identifier for the user within the service */ - identifier?: string; - /** Additional profile details extracted from this login method */ - details?: unknown; - /** Whether this connected account has been verified */ - isVerified?: boolean; - createdAt?: string; - updatedAt?: string; -} export interface UpdatePhoneNumberInput { clientMutationId?: string; id: string; @@ -12274,24 +12963,6 @@ export interface RateLimitsModulePatch { ipRateLimitsTable?: string; rateLimitsTable?: string; } -export interface UpdateTableTemplateModuleInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `TableTemplateModule` being updated. */ - tableTemplateModulePatch: TableTemplateModulePatch; -} -/** Represents an update to a `TableTemplateModule`. Fields that are set will be updated. */ -export interface TableTemplateModulePatch { - id?: string; - databaseId?: string; - schemaId?: string; - privateSchemaId?: string; - tableId?: string; - ownerTableId?: string; - tableName?: string; - nodeType?: string; - data?: unknown; -} export interface UpdateOrgChartEdgeGrantInput { clientMutationId?: string; id: string; @@ -12337,6 +13008,28 @@ export interface OrgLimitPatch { max?: number; entityId?: string; } +export interface UpdateMembershipTypeInput { + clientMutationId?: string; + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; + /** An object where the defined keys will be set on the `MembershipType` being updated. */ + membershipTypePatch: MembershipTypePatch; +} +/** Represents an update to a `MembershipType`. Fields that are set will be updated. */ +export interface MembershipTypePatch { + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id?: number; + /** Human-readable name of the membership type */ + name?: string; + /** Description of what this membership type represents */ + description?: string; + /** Short prefix used to namespace tables and functions for this membership scope */ + prefix?: string; + /** Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) */ + parentMembershipType?: number; + /** When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs */ + hasUsersTableEntry?: boolean; +} export interface UpdateDomainInput { clientMutationId?: string; /** Unique identifier for this domain record */ @@ -12676,6 +13369,36 @@ export interface DenormalizedTableFieldPatch { funcName?: string; funcOrder?: number; } +export interface UpdateOrgMemberProfileInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgMemberProfile` being updated. */ + orgMemberProfilePatch: OrgMemberProfilePatch; +} +/** Represents an update to a `OrgMemberProfile`. Fields that are set will be updated. */ +export interface OrgMemberProfilePatch { + id?: string; + createdAt?: string; + updatedAt?: string; + /** References the membership this profile belongs to (1:1) */ + membershipId?: string; + /** References the entity this profile belongs to (used for RLS lookups) */ + entityId?: string; + /** References the user who owns this profile (for self-edit RLS) */ + actorId?: string; + /** Display name shown to other entity members */ + displayName?: string; + /** Email address visible to other entity members (auto-populated from verified primary email) */ + email?: string; + /** Job title or role description visible to other entity members */ + title?: string; + /** Short biography visible to other entity members */ + bio?: string; + /** Profile picture visible to other entity members */ + profilePicture?: ConstructiveInternalTypeImage; + /** Upload for Profile picture visible to other entity members */ + profilePictureUpload?: File; +} export interface UpdateDatabaseTransferInput { clientMutationId?: string; id: string; @@ -12997,6 +13720,30 @@ export interface UniqueConstraintPatch { createdAt?: string; updatedAt?: string; } +export interface UpdateSpatialRelationInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `SpatialRelation` being updated. */ + spatialRelationPatch: SpatialRelationPatch; +} +/** Represents an update to a `SpatialRelation`. Fields that are set will be updated. */ +export interface SpatialRelationPatch { + id?: string; + databaseId?: string; + tableId?: string; + fieldId?: string; + refTableId?: string; + refFieldId?: string; + name?: string; + operator?: string; + paramName?: string; + category?: ObjectCategory; + module?: string; + scope?: number; + tags?: string[]; + createdAt?: string; + updatedAt?: string; +} export interface UpdatePolicyInput { clientMutationId?: string; id: string; @@ -13023,6 +13770,140 @@ export interface PolicyPatch { createdAt?: string; updatedAt?: string; } +export interface UpdateEntityTypeProvisionInput { + clientMutationId?: string; + /** Unique identifier for this provision row. */ + id: string; + /** An object where the defined keys will be set on the `EntityTypeProvision` being updated. */ + entityTypeProvisionPatch: EntityTypeProvisionPatch; +} +/** Represents an update to a `EntityTypeProvision`. Fields that are set will be updated. */ +export interface EntityTypeProvisionPatch { + /** Unique identifier for this provision row. */ + id?: string; + /** The database to provision this entity type in. Required. */ + databaseId?: string; + /** + * Human-readable name for this membership type, e.g. 'Data Room Member', 'Team Channel Member'. Required. + * Stored in the membership_types registry table. + */ + name?: string; + /** + * SQL prefix used for table and module naming, e.g. 'data_room', 'team_channel'. Required. + * Drives entity table name (prefix || 's' by default), module labels (permissions_module:prefix), + * and membership table names (prefix_memberships, prefix_members, etc.). + * Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING. + */ + prefix?: string; + /** Description of this membership type. Stored in the membership_types registry table. Defaults to empty string. */ + description?: string; + /** + * Prefix of the parent entity type. The trigger resolves this to a membership_type integer + * by looking up memberships_module WHERE prefix = parent_entity. + * Defaults to 'org' (the organization-level type). For nested types, set to the parent's prefix + * (e.g. 'data_room' for a team_channel nested under data_room). + * The parent type must already be provisioned before this INSERT. + */ + parentEntity?: string; + /** + * Override the entity table name. When NULL (default), the table name is derived as prefix || 's' + * (e.g. prefix 'data_room' produces table 'data_rooms'). + * Set this when the pluralization rule doesn't apply (e.g. prefix 'staff' should produce 'staff' not 'staffs'). + */ + tableName?: string; + /** + * Whether members of the parent entity can see child entities. Defaults to true. + * When true: a SELECT policy allows parent members to list child entities (e.g. org members can see all data rooms). + * When false: only direct members of the entity itself can see it (private entity mode). + * Controls whether the parent_member SELECT policy is created on the entity table. + * Only meaningful on the defaults path — ignored (no-op) when table_provision is non-NULL or + * skip_entity_policies=true, since no default policies are being applied in those cases. + */ + isVisible?: boolean; + /** + * Whether to apply limits_module security for this type. Defaults to false. + * The limits_module table structure is always created (memberships_module requires it), + * but when false, no RLS policies are applied to the limits tables. + * Set to true if this entity type needs configurable resource limits per membership. + */ + hasLimits?: boolean; + /** + * Whether to provision profiles_module for this type. Defaults to false. + * Profiles provide named permission roles (e.g. 'Editor', 'Viewer') with pre-configured permission bitmasks. + * When true, creates profile tables and applies profiles security. + */ + hasProfiles?: boolean; + /** + * Whether to provision levels_module for this type. Defaults to false. + * Levels provide gamification/achievement tracking for members. + * When true, creates level steps, achievements, and level tables with security. + */ + hasLevels?: boolean; + /** + * Escape hatch: when true, apply zero RLS policies to the entity table. Defaults to false. + * Use this only when you want the entity table provisioned with zero policies (e.g. because you + * plan to insert secure_table_provision rows yourself later). In most cases, prefer leaving this + * false and either accepting the five defaults (table_provision=NULL) or overriding them via + * table_provision. + * Defaults (applied when table_provision IS NULL and skip_entity_policies=false): + * - SELECT (parent_member): parent entity members can see child entities (only when is_visible=true) + * - SELECT (self_member): direct members of the entity can see it + * - INSERT: create_entity permission on the parent entity + * - UPDATE: admin_entity permission on the entity itself + * - DELETE: owner of the entity can delete it + */ + skipEntityPolicies?: boolean; + /** + * Single jsonb object describing the full security setup to apply to the entity table. + * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * entries, so an entity table is configured the same way an ordinary blueprint table is. + * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by + * table_provision.policies[] (is_visible becomes a no-op on this path). + * Recognized keys (all optional): + * - use_rls (boolean, default true) + * - nodes (jsonb array of {"$type","data"} Data* module entries) + * - fields (jsonb array of field objects: name,type,is_required,default,min,max,regexp,index) + * - grant_privileges (jsonb array of [privilege, columns] tuples) + * - grant_roles (jsonb array of role names; defaults to ["authenticated"]) + * - policies (jsonb array of policy objects; each with $type, privileges, data, name, role, permissive) + * The trigger fans policies[] into N secure_table_provision rows against the newly created entity table, + * with table-level setup (nodes/fields/grants) attached to the first row. + * Example — override with two SELECT policies: + * table_provision := jsonb_build_object( + * 'policies', jsonb_build_array( + * jsonb_build_object( + * '$type', 'AuthzEntityMembership', + * 'privileges', jsonb_build_array('select'), + * 'data', jsonb_build_object('entity_field', 'id', 'membership_type', 3), + * 'name', 'self_member' + * ), + * jsonb_build_object( + * '$type', 'AuthzDirectOwner', + * 'privileges', jsonb_build_array('select', 'update'), + * 'data', jsonb_build_object('owner_field', 'owner_id') + * ) + * ) + * ) + */ + tableProvision?: unknown; + /** + * Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning. + * This is the ID used in membership_types, memberships_module, and all module tables. + */ + outMembershipType?: number; + /** + * Output: the UUID of the created entity table. Populated by the trigger. + * Use this to reference the entity table in subsequent relation_provision or secure_table_provision rows. + */ + outEntityTableId?: string; + /** Output: the name of the created entity table (e.g. 'data_rooms'). Populated by the trigger. */ + outEntityTableName?: string; + /** + * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Populated by the trigger. Useful for verifying which modules were provisioned. + */ + outInstalledModules?: string[]; +} export interface UpdatePermissionsModuleInput { clientMutationId?: string; id: string; @@ -13079,76 +13960,6 @@ export interface AppInvitePatch { createdAt?: string; updatedAt?: string; } -export interface UpdateAppMembershipInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `AppMembership` being updated. */ - appMembershipPatch: AppMembershipPatch; -} -/** Represents an update to a `AppMembership`. Fields that are set will be updated. */ -export interface AppMembershipPatch { - id?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: string; - updatedBy?: string; - /** Whether this membership has been approved by an admin */ - isApproved?: boolean; - /** Whether this member has been banned from the entity */ - isBanned?: boolean; - /** Whether this membership is temporarily disabled */ - isDisabled?: boolean; - /** Whether this member has been verified (e.g. email confirmation) */ - isVerified?: boolean; - /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ - isActive?: boolean; - /** Whether the actor is the owner of this entity */ - isOwner?: boolean; - /** Whether the actor has admin privileges on this entity */ - isAdmin?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ - granted?: string; - /** References the user who holds this membership */ - actorId?: string; - profileId?: string; -} -export interface UpdateOrgMembershipInput { - clientMutationId?: string; - id: string; - /** An object where the defined keys will be set on the `OrgMembership` being updated. */ - orgMembershipPatch: OrgMembershipPatch; -} -/** Represents an update to a `OrgMembership`. Fields that are set will be updated. */ -export interface OrgMembershipPatch { - id?: string; - createdAt?: string; - updatedAt?: string; - createdBy?: string; - updatedBy?: string; - /** Whether this membership has been approved by an admin */ - isApproved?: boolean; - /** Whether this member has been banned from the entity */ - isBanned?: boolean; - /** Whether this membership is temporarily disabled */ - isDisabled?: boolean; - /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ - isActive?: boolean; - /** Whether the actor is the owner of this entity */ - isOwner?: boolean; - /** Whether the actor has admin privileges on this entity */ - isAdmin?: boolean; - /** Aggregated permission bitmask combining profile-based and directly granted permissions */ - permissions?: string; - /** Bitmask of permissions directly granted to this member (not from profiles) */ - granted?: string; - /** References the user who holds this membership */ - actorId?: string; - /** References the entity (org or group) this membership belongs to */ - entityId?: string; - profileId?: string; -} export interface UpdateEmbeddingChunkInput { clientMutationId?: string; id: string; @@ -13253,6 +14064,43 @@ export interface ProfilesModulePatch { membershipsTableId?: string; prefix?: string; } +export interface UpdateAppMembershipInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `AppMembership` being updated. */ + appMembershipPatch: AppMembershipPatch; +} +/** Represents an update to a `AppMembership`. Fields that are set will be updated. */ +export interface AppMembershipPatch { + id?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: string; + updatedBy?: string; + /** Whether this membership has been approved by an admin */ + isApproved?: boolean; + /** Whether this member has been banned from the entity */ + isBanned?: boolean; + /** Whether this membership is temporarily disabled */ + isDisabled?: boolean; + /** Whether this member has been verified (e.g. email confirmation) */ + isVerified?: boolean; + /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ + isActive?: boolean; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean; + /** Whether the actor is the owner of this entity */ + isOwner?: boolean; + /** Whether the actor has admin privileges on this entity */ + isAdmin?: boolean; + /** Aggregated permission bitmask combining profile-based and directly granted permissions */ + permissions?: string; + /** Bitmask of permissions directly granted to this member (not from profiles) */ + granted?: string; + /** References the user who holds this membership */ + actorId?: string; + profileId?: string; +} export interface UpdateIndexInput { clientMutationId?: string; id: string; @@ -13358,6 +14206,45 @@ export interface SecureTableProvisionPatch { /** Output column populated by the trigger after field creation. Contains the UUIDs of the metaschema fields created on the target table by this provision row's nodes. NULL when nodes is empty or before the trigger runs. Callers should not set this directly. */ outFields?: string[]; } +export interface UpdateOrgMembershipInput { + clientMutationId?: string; + id: string; + /** An object where the defined keys will be set on the `OrgMembership` being updated. */ + orgMembershipPatch: OrgMembershipPatch; +} +/** Represents an update to a `OrgMembership`. Fields that are set will be updated. */ +export interface OrgMembershipPatch { + id?: string; + createdAt?: string; + updatedAt?: string; + createdBy?: string; + updatedBy?: string; + /** Whether this membership has been approved by an admin */ + isApproved?: boolean; + /** Whether this member has been banned from the entity */ + isBanned?: boolean; + /** Whether this membership is temporarily disabled */ + isDisabled?: boolean; + /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ + isActive?: boolean; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean; + /** Whether the actor is the owner of this entity */ + isOwner?: boolean; + /** Whether the actor has admin privileges on this entity */ + isAdmin?: boolean; + /** Aggregated permission bitmask combining profile-based and directly granted permissions */ + permissions?: string; + /** Bitmask of permissions directly granted to this member (not from profiles) */ + granted?: string; + /** References the user who holds this membership */ + actorId?: string; + /** References the entity (org or group) this membership belongs to */ + entityId?: string; + /** Whether this member has read-only access (blocks mutations when true) */ + isReadOnly?: boolean; + profileId?: string; +} export interface UpdateBlueprintTemplateInput { clientMutationId?: string; /** Unique identifier for this template. */ @@ -13587,8 +14474,8 @@ export interface UserAuthModulePatch { checkPasswordFunction?: string; sendAccountDeletionEmailFunction?: string; deleteAccountFunction?: string; - signInOneTimeTokenFunction?: string; - oneTimeTokenFunction?: string; + signInCrossOriginFunction?: string; + requestCrossOriginTokenFunction?: string; extendTokenExpires?: string; } export interface UpdateFieldInput { @@ -13813,6 +14700,7 @@ export interface MembershipsModulePatch { entityIdsByMask?: string; entityIdsByPerm?: string; entityIdsFunction?: string; + memberProfilesTableId?: string; } export interface DeleteDefaultIdsModuleInput { clientMutationId?: string; @@ -13893,6 +14781,10 @@ export interface DeleteViewRuleInput { clientMutationId?: string; id: string; } +export interface DeleteSessionSecretsModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteAppAdminGrantInput { clientMutationId?: string; id: string; @@ -13926,6 +14818,10 @@ export interface DeleteConnectedAccountsModuleInput { clientMutationId?: string; id: string; } +export interface DeleteDevicesModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteEmailsModuleInput { clientMutationId?: string; id: string; @@ -13938,6 +14834,10 @@ export interface DeleteUsersModuleInput { clientMutationId?: string; id: string; } +export interface DeleteWebauthnCredentialsModuleInput { + clientMutationId?: string; + id: string; +} export interface DeleteOrgAdminGrantInput { clientMutationId?: string; id: string; @@ -13950,11 +14850,6 @@ export interface DeleteCryptoAddressInput { clientMutationId?: string; id: string; } -export interface DeleteMembershipTypeInput { - clientMutationId?: string; - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; -} export interface DeleteObjectInput { clientMutationId?: string; id: string; @@ -13968,10 +14863,6 @@ export interface DeleteCryptoAddressesModuleInput { clientMutationId?: string; id: string; } -export interface DeleteConnectedAccountInput { - clientMutationId?: string; - id: string; -} export interface DeletePhoneNumberInput { clientMutationId?: string; id: string; @@ -14028,10 +14919,6 @@ export interface DeleteRateLimitsModuleInput { clientMutationId?: string; id: string; } -export interface DeleteTableTemplateModuleInput { - clientMutationId?: string; - id: string; -} export interface DeleteOrgChartEdgeGrantInput { clientMutationId?: string; id: string; @@ -14040,6 +14927,11 @@ export interface DeleteOrgLimitInput { clientMutationId?: string; id: string; } +export interface DeleteMembershipTypeInput { + clientMutationId?: string; + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; +} export interface DeleteDomainInput { clientMutationId?: string; /** Unique identifier for this domain record */ @@ -14103,6 +14995,10 @@ export interface DeleteDenormalizedTableFieldInput { clientMutationId?: string; id: string; } +export interface DeleteOrgMemberProfileInput { + clientMutationId?: string; + id: string; +} export interface DeleteDatabaseTransferInput { clientMutationId?: string; id: string; @@ -14157,23 +15053,24 @@ export interface DeleteUniqueConstraintInput { clientMutationId?: string; id: string; } -export interface DeletePolicyInput { +export interface DeleteSpatialRelationInput { clientMutationId?: string; id: string; } -export interface DeletePermissionsModuleInput { +export interface DeletePolicyInput { clientMutationId?: string; id: string; } -export interface DeleteAppInviteInput { +export interface DeleteEntityTypeProvisionInput { clientMutationId?: string; + /** Unique identifier for this provision row. */ id: string; } -export interface DeleteAppMembershipInput { +export interface DeletePermissionsModuleInput { clientMutationId?: string; id: string; } -export interface DeleteOrgMembershipInput { +export interface DeleteAppInviteInput { clientMutationId?: string; id: string; } @@ -14193,6 +15090,10 @@ export interface DeleteProfilesModuleInput { clientMutationId?: string; id: string; } +export interface DeleteAppMembershipInput { + clientMutationId?: string; + id: string; +} export interface DeleteIndexInput { clientMutationId?: string; id: string; @@ -14206,6 +15107,10 @@ export interface DeleteSecureTableProvisionInput { /** Unique identifier for this provision row. */ id: string; } +export interface DeleteOrgMembershipInput { + clientMutationId?: string; + id: string; +} export interface DeleteBlueprintTemplateInput { clientMutationId?: string; /** Unique identifier for this template. */ @@ -14443,6 +15348,13 @@ export interface ViewRuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `SessionSecretsModule` values. */ +export interface SessionSecretsModuleConnection { + nodes: SessionSecretsModule[]; + edges: SessionSecretsModuleEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `AppAdminGrant` values. */ export interface AppAdminGrantConnection { nodes: AppAdminGrant[]; @@ -14506,6 +15418,13 @@ export interface ConnectedAccountsModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `DevicesModule` values. */ +export interface DevicesModuleConnection { + nodes: DevicesModule[]; + edges: DevicesModuleEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `EmailsModule` values. */ export interface EmailsModuleConnection { nodes: EmailsModule[]; @@ -14527,6 +15446,13 @@ export interface UsersModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `WebauthnCredentialsModule` values. */ +export interface WebauthnCredentialsModuleConnection { + nodes: WebauthnCredentialsModule[]; + edges: WebauthnCredentialsModuleEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `OrgAdminGrant` values. */ export interface OrgAdminGrantConnection { nodes: OrgAdminGrant[]; @@ -14548,10 +15474,10 @@ export interface CryptoAddressConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `MembershipType` values. */ -export interface MembershipTypeConnection { - nodes: MembershipType[]; - edges: MembershipTypeEdge[]; +/** A connection to a list of `UserConnectedAccount` values. */ +export interface UserConnectedAccountConnection { + nodes: UserConnectedAccount[]; + edges: UserConnectedAccountEdge[]; pageInfo: PageInfo; totalCount: number; } @@ -14569,13 +15495,6 @@ export interface CryptoAddressesModuleConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `ConnectedAccount` values. */ -export interface ConnectedAccountConnection { - nodes: ConnectedAccount[]; - edges: ConnectedAccountEdge[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `PhoneNumber` values. */ export interface PhoneNumberConnection { nodes: PhoneNumber[]; @@ -14653,13 +15572,6 @@ export interface RateLimitsModuleConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `TableTemplateModule` values. */ -export interface TableTemplateModuleConnection { - nodes: TableTemplateModule[]; - edges: TableTemplateModuleEdge[]; - pageInfo: PageInfo; - totalCount: number; -} /** A connection to a list of `OrgChartEdgeGrant` values. */ export interface OrgChartEdgeGrantConnection { nodes: OrgChartEdgeGrant[]; @@ -14674,6 +15586,13 @@ export interface OrgLimitConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `MembershipType` values. */ +export interface MembershipTypeConnection { + nodes: MembershipType[]; + edges: MembershipTypeEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `Domain` values. */ export interface DomainConnection { nodes: Domain[]; @@ -14772,6 +15691,13 @@ export interface DenormalizedTableFieldConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `OrgMemberProfile` values. */ +export interface OrgMemberProfileConnection { + nodes: OrgMemberProfile[]; + edges: OrgMemberProfileEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `SqlAction` values. */ export interface SqlActionConnection { nodes: SqlAction[]; @@ -14877,6 +15803,13 @@ export interface UniqueConstraintConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `SpatialRelation` values. */ +export interface SpatialRelationConnection { + nodes: SpatialRelation[]; + edges: SpatialRelationEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `Policy` values. */ export interface PolicyConnection { nodes: Policy[]; @@ -14884,6 +15817,13 @@ export interface PolicyConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `EntityTypeProvision` values. */ +export interface EntityTypeProvisionConnection { + nodes: EntityTypeProvision[]; + edges: EntityTypeProvisionEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `PermissionsModule` values. */ export interface PermissionsModuleConnection { nodes: PermissionsModule[]; @@ -14891,24 +15831,10 @@ export interface PermissionsModuleConnection { pageInfo: PageInfo; totalCount: number; } -/** A connection to a list of `AppInvite` values. */ -export interface AppInviteConnection { - nodes: AppInvite[]; - edges: AppInviteEdge[]; - pageInfo: PageInfo; - totalCount: number; -} -/** A connection to a list of `AppMembership` values. */ -export interface AppMembershipConnection { - nodes: AppMembership[]; - edges: AppMembershipEdge[]; - pageInfo: PageInfo; - totalCount: number; -} -/** A connection to a list of `OrgMembership` values. */ -export interface OrgMembershipConnection { - nodes: OrgMembership[]; - edges: OrgMembershipEdge[]; +/** A connection to a list of `AppInvite` values. */ +export interface AppInviteConnection { + nodes: AppInvite[]; + edges: AppInviteEdge[]; pageInfo: PageInfo; totalCount: number; } @@ -14940,6 +15866,13 @@ export interface ProfilesModuleConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `AppMembership` values. */ +export interface AppMembershipConnection { + nodes: AppMembership[]; + edges: AppMembershipEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `Index` values. */ export interface IndexConnection { nodes: Index[]; @@ -14961,6 +15894,13 @@ export interface SecureTableProvisionConnection { pageInfo: PageInfo; totalCount: number; } +/** A connection to a list of `OrgMembership` values. */ +export interface OrgMembershipConnection { + nodes: OrgMembership[]; + edges: OrgMembershipEdge[]; + pageInfo: PageInfo; + totalCount: number; +} /** A connection to a list of `BlueprintTemplate` values. */ export interface BlueprintTemplateConnection { nodes: BlueprintTemplate[]; @@ -15054,6 +15994,18 @@ export interface RejectDatabaseTransferPayload { clientMutationId?: string | null; result?: boolean | null; } +export interface DisconnectAccountPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export interface RevokeApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export interface RevokeSessionPayload { + clientMutationId?: string | null; + result?: boolean | null; +} export interface VerifyPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -15095,6 +16047,10 @@ export interface ConstructBlueprintPayload { clientMutationId?: string | null; result?: string | null; } +export interface ProvisionNewUserPayload { + clientMutationId?: string | null; + result?: string | null; +} export interface ResetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -15107,6 +16063,14 @@ export interface CopyTemplateToBlueprintPayload { clientMutationId?: string | null; result?: string | null; } +export interface CreateApiKeyPayload { + clientMutationId?: string | null; + result?: CreateApiKeyRecord | null; +} +export interface ProvisionSpatialRelationPayload { + clientMutationId?: string | null; + result?: string | null; +} export interface BootstrapUserPayload { clientMutationId?: string | null; result?: BootstrapUserRecord[] | null; @@ -15156,9 +16120,9 @@ export interface ProvisionRelationPayload { export interface ApplyRlsPayload { clientMutationId?: string | null; } -export interface SignInOneTimeTokenPayload { +export interface SignInCrossOriginPayload { clientMutationId?: string | null; - result?: SignInOneTimeTokenRecord | null; + result?: SignInCrossOriginRecord | null; } export interface CreateUserDatabasePayload { clientMutationId?: string | null; @@ -15168,18 +16132,18 @@ export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; } -export interface SignInPayload { - clientMutationId?: string | null; - result?: SignInRecord | null; -} export interface SignUpPayload { clientMutationId?: string | null; result?: SignUpRecord | null; } -export interface OneTimeTokenPayload { +export interface RequestCrossOriginTokenPayload { clientMutationId?: string | null; result?: string | null; } +export interface SignInPayload { + clientMutationId?: string | null; + result?: SignInRecord | null; +} export interface ProvisionTablePayload { clientMutationId?: string | null; result?: ProvisionTableRecord[] | null; @@ -15299,6 +16263,12 @@ export interface CreateViewRulePayload { viewRule?: ViewRule | null; viewRuleEdge?: ViewRuleEdge | null; } +export interface CreateSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was created by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} export interface CreateAppAdminGrantPayload { clientMutationId?: string | null; /** The `AppAdminGrant` that was created by this mutation. */ @@ -15352,6 +16322,12 @@ export interface CreateConnectedAccountsModulePayload { connectedAccountsModule?: ConnectedAccountsModule | null; connectedAccountsModuleEdge?: ConnectedAccountsModuleEdge | null; } +export interface CreateDevicesModulePayload { + clientMutationId?: string | null; + /** The `DevicesModule` that was created by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; +} export interface CreateEmailsModulePayload { clientMutationId?: string | null; /** The `EmailsModule` that was created by this mutation. */ @@ -15370,6 +16346,12 @@ export interface CreateUsersModulePayload { usersModule?: UsersModule | null; usersModuleEdge?: UsersModuleEdge | null; } +export interface CreateWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was created by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} export interface CreateOrgAdminGrantPayload { clientMutationId?: string | null; /** The `OrgAdminGrant` that was created by this mutation. */ @@ -15388,11 +16370,10 @@ export interface CreateCryptoAddressPayload { cryptoAddress?: CryptoAddress | null; cryptoAddressEdge?: CryptoAddressEdge | null; } -export interface CreateMembershipTypePayload { +export interface CreateUserConnectedAccountPayload { clientMutationId?: string | null; - /** The `MembershipType` that was created by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; + /** The `UserConnectedAccount` that was created by this mutation. */ + userConnectedAccount?: UserConnectedAccount | null; } export interface CreateObjectPayload { clientMutationId?: string | null; @@ -15412,12 +16393,6 @@ export interface CreateCryptoAddressesModulePayload { cryptoAddressesModule?: CryptoAddressesModule | null; cryptoAddressesModuleEdge?: CryptoAddressesModuleEdge | null; } -export interface CreateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was created by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} export interface CreatePhoneNumberPayload { clientMutationId?: string | null; /** The `PhoneNumber` that was created by this mutation. */ @@ -15496,12 +16471,6 @@ export interface CreateRateLimitsModulePayload { rateLimitsModule?: RateLimitsModule | null; rateLimitsModuleEdge?: RateLimitsModuleEdge | null; } -export interface CreateTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was created by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} export interface CreateOrgChartEdgeGrantPayload { clientMutationId?: string | null; /** The `OrgChartEdgeGrant` that was created by this mutation. */ @@ -15514,6 +16483,12 @@ export interface CreateOrgLimitPayload { orgLimit?: OrgLimit | null; orgLimitEdge?: OrgLimitEdge | null; } +export interface CreateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was created by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} export interface CreateDomainPayload { clientMutationId?: string | null; /** The `Domain` that was created by this mutation. */ @@ -15604,6 +16579,12 @@ export interface CreateDenormalizedTableFieldPayload { denormalizedTableField?: DenormalizedTableField | null; denormalizedTableFieldEdge?: DenormalizedTableFieldEdge | null; } +export interface CreateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was created by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} export interface CreateSqlActionPayload { clientMutationId?: string | null; /** The `SqlAction` that was created by this mutation. */ @@ -15692,12 +16673,24 @@ export interface CreateUniqueConstraintPayload { uniqueConstraint?: UniqueConstraint | null; uniqueConstraintEdge?: UniqueConstraintEdge | null; } +export interface CreateSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was created by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} export interface CreatePolicyPayload { clientMutationId?: string | null; /** The `Policy` that was created by this mutation. */ policy?: Policy | null; policyEdge?: PolicyEdge | null; } +export interface CreateEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was created by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} export interface CreatePermissionsModulePayload { clientMutationId?: string | null; /** The `PermissionsModule` that was created by this mutation. */ @@ -15710,18 +16703,6 @@ export interface CreateAppInvitePayload { appInvite?: AppInvite | null; appInviteEdge?: AppInviteEdge | null; } -export interface CreateAppMembershipPayload { - clientMutationId?: string | null; - /** The `AppMembership` that was created by this mutation. */ - appMembership?: AppMembership | null; - appMembershipEdge?: AppMembershipEdge | null; -} -export interface CreateOrgMembershipPayload { - clientMutationId?: string | null; - /** The `OrgMembership` that was created by this mutation. */ - orgMembership?: OrgMembership | null; - orgMembershipEdge?: OrgMembershipEdge | null; -} export interface CreateEmbeddingChunkPayload { clientMutationId?: string | null; /** The `EmbeddingChunk` that was created by this mutation. */ @@ -15746,6 +16727,12 @@ export interface CreateProfilesModulePayload { profilesModule?: ProfilesModule | null; profilesModuleEdge?: ProfilesModuleEdge | null; } +export interface CreateAppMembershipPayload { + clientMutationId?: string | null; + /** The `AppMembership` that was created by this mutation. */ + appMembership?: AppMembership | null; + appMembershipEdge?: AppMembershipEdge | null; +} export interface CreateIndexPayload { clientMutationId?: string | null; /** The `Index` that was created by this mutation. */ @@ -15764,6 +16751,12 @@ export interface CreateSecureTableProvisionPayload { secureTableProvision?: SecureTableProvision | null; secureTableProvisionEdge?: SecureTableProvisionEdge | null; } +export interface CreateOrgMembershipPayload { + clientMutationId?: string | null; + /** The `OrgMembership` that was created by this mutation. */ + orgMembership?: OrgMembership | null; + orgMembershipEdge?: OrgMembershipEdge | null; +} export interface CreateBlueprintTemplatePayload { clientMutationId?: string | null; /** The `BlueprintTemplate` that was created by this mutation. */ @@ -15932,6 +16925,12 @@ export interface UpdateViewRulePayload { viewRule?: ViewRule | null; viewRuleEdge?: ViewRuleEdge | null; } +export interface UpdateSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was updated by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} export interface UpdateAppAdminGrantPayload { clientMutationId?: string | null; /** The `AppAdminGrant` that was updated by this mutation. */ @@ -15980,6 +16979,12 @@ export interface UpdateConnectedAccountsModulePayload { connectedAccountsModule?: ConnectedAccountsModule | null; connectedAccountsModuleEdge?: ConnectedAccountsModuleEdge | null; } +export interface UpdateDevicesModulePayload { + clientMutationId?: string | null; + /** The `DevicesModule` that was updated by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; +} export interface UpdateEmailsModulePayload { clientMutationId?: string | null; /** The `EmailsModule` that was updated by this mutation. */ @@ -15998,6 +17003,12 @@ export interface UpdateUsersModulePayload { usersModule?: UsersModule | null; usersModuleEdge?: UsersModuleEdge | null; } +export interface UpdateWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was updated by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} export interface UpdateOrgAdminGrantPayload { clientMutationId?: string | null; /** The `OrgAdminGrant` that was updated by this mutation. */ @@ -16016,12 +17027,6 @@ export interface UpdateCryptoAddressPayload { cryptoAddress?: CryptoAddress | null; cryptoAddressEdge?: CryptoAddressEdge | null; } -export interface UpdateMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was updated by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} export interface UpdateObjectPayload { clientMutationId?: string | null; /** The `Object` that was updated by this mutation. */ @@ -16040,12 +17045,6 @@ export interface UpdateCryptoAddressesModulePayload { cryptoAddressesModule?: CryptoAddressesModule | null; cryptoAddressesModuleEdge?: CryptoAddressesModuleEdge | null; } -export interface UpdateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was updated by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} export interface UpdatePhoneNumberPayload { clientMutationId?: string | null; /** The `PhoneNumber` that was updated by this mutation. */ @@ -16124,12 +17123,6 @@ export interface UpdateRateLimitsModulePayload { rateLimitsModule?: RateLimitsModule | null; rateLimitsModuleEdge?: RateLimitsModuleEdge | null; } -export interface UpdateTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was updated by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} export interface UpdateOrgChartEdgeGrantPayload { clientMutationId?: string | null; /** The `OrgChartEdgeGrant` that was updated by this mutation. */ @@ -16142,6 +17135,12 @@ export interface UpdateOrgLimitPayload { orgLimit?: OrgLimit | null; orgLimitEdge?: OrgLimitEdge | null; } +export interface UpdateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was updated by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} export interface UpdateDomainPayload { clientMutationId?: string | null; /** The `Domain` that was updated by this mutation. */ @@ -16232,6 +17231,12 @@ export interface UpdateDenormalizedTableFieldPayload { denormalizedTableField?: DenormalizedTableField | null; denormalizedTableFieldEdge?: DenormalizedTableFieldEdge | null; } +export interface UpdateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was updated by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} export interface UpdateDatabaseTransferPayload { clientMutationId?: string | null; /** The `DatabaseTransfer` that was updated by this mutation. */ @@ -16310,12 +17315,24 @@ export interface UpdateUniqueConstraintPayload { uniqueConstraint?: UniqueConstraint | null; uniqueConstraintEdge?: UniqueConstraintEdge | null; } +export interface UpdateSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was updated by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} export interface UpdatePolicyPayload { clientMutationId?: string | null; /** The `Policy` that was updated by this mutation. */ policy?: Policy | null; policyEdge?: PolicyEdge | null; } +export interface UpdateEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was updated by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} export interface UpdatePermissionsModulePayload { clientMutationId?: string | null; /** The `PermissionsModule` that was updated by this mutation. */ @@ -16328,18 +17345,6 @@ export interface UpdateAppInvitePayload { appInvite?: AppInvite | null; appInviteEdge?: AppInviteEdge | null; } -export interface UpdateAppMembershipPayload { - clientMutationId?: string | null; - /** The `AppMembership` that was updated by this mutation. */ - appMembership?: AppMembership | null; - appMembershipEdge?: AppMembershipEdge | null; -} -export interface UpdateOrgMembershipPayload { - clientMutationId?: string | null; - /** The `OrgMembership` that was updated by this mutation. */ - orgMembership?: OrgMembership | null; - orgMembershipEdge?: OrgMembershipEdge | null; -} export interface UpdateEmbeddingChunkPayload { clientMutationId?: string | null; /** The `EmbeddingChunk` that was updated by this mutation. */ @@ -16364,6 +17369,12 @@ export interface UpdateProfilesModulePayload { profilesModule?: ProfilesModule | null; profilesModuleEdge?: ProfilesModuleEdge | null; } +export interface UpdateAppMembershipPayload { + clientMutationId?: string | null; + /** The `AppMembership` that was updated by this mutation. */ + appMembership?: AppMembership | null; + appMembershipEdge?: AppMembershipEdge | null; +} export interface UpdateIndexPayload { clientMutationId?: string | null; /** The `Index` that was updated by this mutation. */ @@ -16382,6 +17393,12 @@ export interface UpdateSecureTableProvisionPayload { secureTableProvision?: SecureTableProvision | null; secureTableProvisionEdge?: SecureTableProvisionEdge | null; } +export interface UpdateOrgMembershipPayload { + clientMutationId?: string | null; + /** The `OrgMembership` that was updated by this mutation. */ + orgMembership?: OrgMembership | null; + orgMembershipEdge?: OrgMembershipEdge | null; +} export interface UpdateBlueprintTemplatePayload { clientMutationId?: string | null; /** The `BlueprintTemplate` that was updated by this mutation. */ @@ -16550,6 +17567,12 @@ export interface DeleteViewRulePayload { viewRule?: ViewRule | null; viewRuleEdge?: ViewRuleEdge | null; } +export interface DeleteSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was deleted by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} export interface DeleteAppAdminGrantPayload { clientMutationId?: string | null; /** The `AppAdminGrant` that was deleted by this mutation. */ @@ -16598,6 +17621,12 @@ export interface DeleteConnectedAccountsModulePayload { connectedAccountsModule?: ConnectedAccountsModule | null; connectedAccountsModuleEdge?: ConnectedAccountsModuleEdge | null; } +export interface DeleteDevicesModulePayload { + clientMutationId?: string | null; + /** The `DevicesModule` that was deleted by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; +} export interface DeleteEmailsModulePayload { clientMutationId?: string | null; /** The `EmailsModule` that was deleted by this mutation. */ @@ -16616,6 +17645,12 @@ export interface DeleteUsersModulePayload { usersModule?: UsersModule | null; usersModuleEdge?: UsersModuleEdge | null; } +export interface DeleteWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was deleted by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} export interface DeleteOrgAdminGrantPayload { clientMutationId?: string | null; /** The `OrgAdminGrant` that was deleted by this mutation. */ @@ -16634,12 +17669,6 @@ export interface DeleteCryptoAddressPayload { cryptoAddress?: CryptoAddress | null; cryptoAddressEdge?: CryptoAddressEdge | null; } -export interface DeleteMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was deleted by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} export interface DeleteObjectPayload { clientMutationId?: string | null; /** The `Object` that was deleted by this mutation. */ @@ -16658,12 +17687,6 @@ export interface DeleteCryptoAddressesModulePayload { cryptoAddressesModule?: CryptoAddressesModule | null; cryptoAddressesModuleEdge?: CryptoAddressesModuleEdge | null; } -export interface DeleteConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was deleted by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} export interface DeletePhoneNumberPayload { clientMutationId?: string | null; /** The `PhoneNumber` that was deleted by this mutation. */ @@ -16742,12 +17765,6 @@ export interface DeleteRateLimitsModulePayload { rateLimitsModule?: RateLimitsModule | null; rateLimitsModuleEdge?: RateLimitsModuleEdge | null; } -export interface DeleteTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was deleted by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} export interface DeleteOrgChartEdgeGrantPayload { clientMutationId?: string | null; /** The `OrgChartEdgeGrant` that was deleted by this mutation. */ @@ -16760,6 +17777,12 @@ export interface DeleteOrgLimitPayload { orgLimit?: OrgLimit | null; orgLimitEdge?: OrgLimitEdge | null; } +export interface DeleteMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was deleted by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} export interface DeleteDomainPayload { clientMutationId?: string | null; /** The `Domain` that was deleted by this mutation. */ @@ -16850,6 +17873,12 @@ export interface DeleteDenormalizedTableFieldPayload { denormalizedTableField?: DenormalizedTableField | null; denormalizedTableFieldEdge?: DenormalizedTableFieldEdge | null; } +export interface DeleteOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was deleted by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} export interface DeleteDatabaseTransferPayload { clientMutationId?: string | null; /** The `DatabaseTransfer` that was deleted by this mutation. */ @@ -16928,12 +17957,24 @@ export interface DeleteUniqueConstraintPayload { uniqueConstraint?: UniqueConstraint | null; uniqueConstraintEdge?: UniqueConstraintEdge | null; } +export interface DeleteSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was deleted by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} export interface DeletePolicyPayload { clientMutationId?: string | null; /** The `Policy` that was deleted by this mutation. */ policy?: Policy | null; policyEdge?: PolicyEdge | null; } +export interface DeleteEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was deleted by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} export interface DeletePermissionsModulePayload { clientMutationId?: string | null; /** The `PermissionsModule` that was deleted by this mutation. */ @@ -16946,18 +17987,6 @@ export interface DeleteAppInvitePayload { appInvite?: AppInvite | null; appInviteEdge?: AppInviteEdge | null; } -export interface DeleteAppMembershipPayload { - clientMutationId?: string | null; - /** The `AppMembership` that was deleted by this mutation. */ - appMembership?: AppMembership | null; - appMembershipEdge?: AppMembershipEdge | null; -} -export interface DeleteOrgMembershipPayload { - clientMutationId?: string | null; - /** The `OrgMembership` that was deleted by this mutation. */ - orgMembership?: OrgMembership | null; - orgMembershipEdge?: OrgMembershipEdge | null; -} export interface DeleteEmbeddingChunkPayload { clientMutationId?: string | null; /** The `EmbeddingChunk` that was deleted by this mutation. */ @@ -16982,6 +18011,12 @@ export interface DeleteProfilesModulePayload { profilesModule?: ProfilesModule | null; profilesModuleEdge?: ProfilesModuleEdge | null; } +export interface DeleteAppMembershipPayload { + clientMutationId?: string | null; + /** The `AppMembership` that was deleted by this mutation. */ + appMembership?: AppMembership | null; + appMembershipEdge?: AppMembershipEdge | null; +} export interface DeleteIndexPayload { clientMutationId?: string | null; /** The `Index` that was deleted by this mutation. */ @@ -17000,6 +18035,12 @@ export interface DeleteSecureTableProvisionPayload { secureTableProvision?: SecureTableProvision | null; secureTableProvisionEdge?: SecureTableProvisionEdge | null; } +export interface DeleteOrgMembershipPayload { + clientMutationId?: string | null; + /** The `OrgMembership` that was deleted by this mutation. */ + orgMembership?: OrgMembership | null; + orgMembershipEdge?: OrgMembershipEdge | null; +} export interface DeleteBlueprintTemplatePayload { clientMutationId?: string | null; /** The `BlueprintTemplate` that was deleted by this mutation. */ @@ -17255,6 +18296,12 @@ export interface ViewRuleEdge { /** The `ViewRule` at the end of the edge. */ node?: ViewRule | null; } +/** A `SessionSecretsModule` edge in the connection. */ +export interface SessionSecretsModuleEdge { + cursor?: string | null; + /** The `SessionSecretsModule` at the end of the edge. */ + node?: SessionSecretsModule | null; +} /** A `AppAdminGrant` edge in the connection. */ export interface AppAdminGrantEdge { cursor?: string | null; @@ -17309,6 +18356,12 @@ export interface ConnectedAccountsModuleEdge { /** The `ConnectedAccountsModule` at the end of the edge. */ node?: ConnectedAccountsModule | null; } +/** A `DevicesModule` edge in the connection. */ +export interface DevicesModuleEdge { + cursor?: string | null; + /** The `DevicesModule` at the end of the edge. */ + node?: DevicesModule | null; +} /** A `EmailsModule` edge in the connection. */ export interface EmailsModuleEdge { cursor?: string | null; @@ -17327,6 +18380,12 @@ export interface UsersModuleEdge { /** The `UsersModule` at the end of the edge. */ node?: UsersModule | null; } +/** A `WebauthnCredentialsModule` edge in the connection. */ +export interface WebauthnCredentialsModuleEdge { + cursor?: string | null; + /** The `WebauthnCredentialsModule` at the end of the edge. */ + node?: WebauthnCredentialsModule | null; +} /** A `OrgAdminGrant` edge in the connection. */ export interface OrgAdminGrantEdge { cursor?: string | null; @@ -17345,11 +18404,11 @@ export interface CryptoAddressEdge { /** The `CryptoAddress` at the end of the edge. */ node?: CryptoAddress | null; } -/** A `MembershipType` edge in the connection. */ -export interface MembershipTypeEdge { +/** A `UserConnectedAccount` edge in the connection. */ +export interface UserConnectedAccountEdge { cursor?: string | null; - /** The `MembershipType` at the end of the edge. */ - node?: MembershipType | null; + /** The `UserConnectedAccount` at the end of the edge. */ + node?: UserConnectedAccount | null; } /** A `Database` edge in the connection. */ export interface DatabaseEdge { @@ -17363,12 +18422,6 @@ export interface CryptoAddressesModuleEdge { /** The `CryptoAddressesModule` at the end of the edge. */ node?: CryptoAddressesModule | null; } -/** A `ConnectedAccount` edge in the connection. */ -export interface ConnectedAccountEdge { - cursor?: string | null; - /** The `ConnectedAccount` at the end of the edge. */ - node?: ConnectedAccount | null; -} /** A `PhoneNumber` edge in the connection. */ export interface PhoneNumberEdge { cursor?: string | null; @@ -17435,12 +18488,6 @@ export interface RateLimitsModuleEdge { /** The `RateLimitsModule` at the end of the edge. */ node?: RateLimitsModule | null; } -/** A `TableTemplateModule` edge in the connection. */ -export interface TableTemplateModuleEdge { - cursor?: string | null; - /** The `TableTemplateModule` at the end of the edge. */ - node?: TableTemplateModule | null; -} /** A `OrgChartEdgeGrant` edge in the connection. */ export interface OrgChartEdgeGrantEdge { cursor?: string | null; @@ -17453,6 +18500,12 @@ export interface OrgLimitEdge { /** The `OrgLimit` at the end of the edge. */ node?: OrgLimit | null; } +/** A `MembershipType` edge in the connection. */ +export interface MembershipTypeEdge { + cursor?: string | null; + /** The `MembershipType` at the end of the edge. */ + node?: MembershipType | null; +} /** A `Domain` edge in the connection. */ export interface DomainEdge { cursor?: string | null; @@ -17537,6 +18590,12 @@ export interface DenormalizedTableFieldEdge { /** The `DenormalizedTableField` at the end of the edge. */ node?: DenormalizedTableField | null; } +/** A `OrgMemberProfile` edge in the connection. */ +export interface OrgMemberProfileEdge { + cursor?: string | null; + /** The `OrgMemberProfile` at the end of the edge. */ + node?: OrgMemberProfile | null; +} /** A `SqlAction` edge in the connection. */ export interface SqlActionEdge { cursor?: string | null; @@ -17627,12 +18686,24 @@ export interface UniqueConstraintEdge { /** The `UniqueConstraint` at the end of the edge. */ node?: UniqueConstraint | null; } +/** A `SpatialRelation` edge in the connection. */ +export interface SpatialRelationEdge { + cursor?: string | null; + /** The `SpatialRelation` at the end of the edge. */ + node?: SpatialRelation | null; +} /** A `Policy` edge in the connection. */ export interface PolicyEdge { cursor?: string | null; /** The `Policy` at the end of the edge. */ node?: Policy | null; } +/** A `EntityTypeProvision` edge in the connection. */ +export interface EntityTypeProvisionEdge { + cursor?: string | null; + /** The `EntityTypeProvision` at the end of the edge. */ + node?: EntityTypeProvision | null; +} /** A `PermissionsModule` edge in the connection. */ export interface PermissionsModuleEdge { cursor?: string | null; @@ -17645,18 +18716,6 @@ export interface AppInviteEdge { /** The `AppInvite` at the end of the edge. */ node?: AppInvite | null; } -/** A `AppMembership` edge in the connection. */ -export interface AppMembershipEdge { - cursor?: string | null; - /** The `AppMembership` at the end of the edge. */ - node?: AppMembership | null; -} -/** A `OrgMembership` edge in the connection. */ -export interface OrgMembershipEdge { - cursor?: string | null; - /** The `OrgMembership` at the end of the edge. */ - node?: OrgMembership | null; -} /** A `EmbeddingChunk` edge in the connection. */ export interface EmbeddingChunkEdge { cursor?: string | null; @@ -17681,6 +18740,12 @@ export interface ProfilesModuleEdge { /** The `ProfilesModule` at the end of the edge. */ node?: ProfilesModule | null; } +/** A `AppMembership` edge in the connection. */ +export interface AppMembershipEdge { + cursor?: string | null; + /** The `AppMembership` at the end of the edge. */ + node?: AppMembership | null; +} /** A `Index` edge in the connection. */ export interface IndexEdge { cursor?: string | null; @@ -17699,6 +18764,12 @@ export interface SecureTableProvisionEdge { /** The `SecureTableProvision` at the end of the edge. */ node?: SecureTableProvision | null; } +/** A `OrgMembership` edge in the connection. */ +export interface OrgMembershipEdge { + cursor?: string | null; + /** The `OrgMembership` at the end of the edge. */ + node?: OrgMembership | null; +} /** A `BlueprintTemplate` edge in the connection. */ export interface BlueprintTemplateEdge { cursor?: string | null; @@ -17773,6 +18844,10 @@ export interface MetaTable { inflection: MetaInflection; query: MetaQuery; } +export interface CreateApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; +} export interface BootstrapUserRecord { outUserId?: string | null; outEmail?: string | null; @@ -17793,7 +18868,7 @@ export interface ProvisionRelationRecord { outSourceFieldId?: string | null; outTargetFieldId?: string | null; } -export interface SignInOneTimeTokenRecord { +export interface SignInCrossOriginRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -17806,7 +18881,7 @@ export interface ExtendTokenExpiresRecord { sessionId?: string | null; expiresAt?: string | null; } -export interface SignInRecord { +export interface SignUpRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -17814,13 +18889,15 @@ export interface SignInRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export interface SignUpRecord { +export interface SignInRecord { id?: string | null; userId?: string | null; accessToken?: string | null; accessTokenExpiresAt?: string | null; isVerified?: boolean | null; totpEnabled?: boolean | null; + mfaRequired?: boolean | null; + mfaChallengeToken?: string | null; } export interface ProvisionTableRecord { outTableId?: string | null; diff --git a/sdk/constructive-react/src/public/types.ts b/sdk/constructive-react/src/public/types.ts index 7492bc87f..d6693ac38 100644 --- a/sdk/constructive-react/src/public/types.ts +++ b/sdk/constructive-react/src/public/types.ts @@ -146,6 +146,23 @@ export interface Field { createdAt: string | null; updatedAt: string | null; } +export interface SpatialRelation { + id: string | null; + databaseId: string | null; + tableId: string | null; + fieldId: string | null; + refTableId: string | null; + refFieldId: string | null; + name: string | null; + operator: string | null; + paramName: string | null; + category: ObjectCategory | null; + module: string | null; + scope: number | null; + tags: string[] | null; + createdAt: string | null; + updatedAt: string | null; +} export interface ForeignKeyConstraint { id: string | null; databaseId: string | null; @@ -335,17 +352,6 @@ export interface EmbeddingChunk { createdAt: string | null; updatedAt: string | null; } -export interface TableTemplateModule { - id: string | null; - databaseId: string | null; - schemaId: string | null; - privateSchemaId: string | null; - tableId: string | null; - ownerTableId: string | null; - tableName: string | null; - nodeType: string | null; - data: unknown | null; -} export interface SecureTableProvision { id: string | null; databaseId: string | null; @@ -397,6 +403,14 @@ export interface RelationProvision { outSourceFieldId: string | null; outTargetFieldId: string | null; } +export interface SessionSecretsModule { + id: string | null; + databaseId: string | null; + schemaId: string | null; + tableId: string | null; + tableName: string | null; + sessionsTableId: string | null; +} export interface SchemaGrant { id: string | null; databaseId: string | null; @@ -697,6 +711,7 @@ export interface MembershipsModule { entityIdsByMask: string | null; entityIdsByPerm: string | null; entityIdsFunction: string | null; + memberProfilesTableId: string | null; } export interface PermissionsModule { id: string | null; @@ -790,8 +805,8 @@ export interface UserAuthModule { checkPasswordFunction: string | null; sendAccountDeletionEmailFunction: string | null; deleteAccountFunction: string | null; - signInOneTimeTokenFunction: string | null; - oneTimeTokenFunction: string | null; + signInCrossOriginFunction: string | null; + requestCrossOriginTokenFunction: string | null; extendTokenExpires: string | null; } export interface UsersModule { @@ -874,6 +889,34 @@ export interface StorageModule { maxFilenameLength: number | null; cacheTtlSeconds: number | null; } +export interface EntityTypeProvision { + id: string | null; + databaseId: string | null; + name: string | null; + prefix: string | null; + description: string | null; + parentEntity: string | null; + tableName: string | null; + isVisible: boolean | null; + hasLimits: boolean | null; + hasProfiles: boolean | null; + hasLevels: boolean | null; + skipEntityPolicies: boolean | null; + tableProvision: unknown | null; + outMembershipType: number | null; + outEntityTableId: string | null; + outEntityTableName: string | null; + outInstalledModules: string[] | null; +} +export interface WebauthnCredentialsModule { + id: string | null; + databaseId: string | null; + schemaId: string | null; + privateSchemaId: string | null; + tableId: string | null; + ownerTableId: string | null; + tableName: string | null; +} export interface DatabaseProvisionModule { id: string | null; databaseName: string | null; @@ -925,12 +968,14 @@ export interface OrgMembership { isBanned: boolean | null; isDisabled: boolean | null; isActive: boolean | null; + isExternal: boolean | null; isOwner: boolean | null; isAdmin: boolean | null; permissions: string | null; granted: string | null; actorId: string | null; entityId: string | null; + isReadOnly: boolean | null; profileId: string | null; } export interface OrgMember { @@ -957,6 +1002,19 @@ export interface OrgOwnerGrant { createdAt: string | null; updatedAt: string | null; } +export interface OrgMemberProfile { + id: string | null; + createdAt: string | null; + updatedAt: string | null; + membershipId: string | null; + entityId: string | null; + actorId: string | null; + displayName: string | null; + email: string | null; + title: string | null; + bio: string | null; + profilePicture: ConstructiveInternalTypeImage | null; +} export interface OrgGrant { id: string | null; permissions: string | null; @@ -1061,16 +1119,6 @@ export interface CryptoAddress { createdAt: string | null; updatedAt: string | null; } -export interface ConnectedAccount { - id: string | null; - ownerId: string | null; - service: string | null; - identifier: string | null; - details: unknown | null; - isVerified: boolean | null; - createdAt: string | null; - updatedAt: string | null; -} export interface AppInvite { id: string | null; email: ConstructiveInternalTypeEmail | null; @@ -1165,11 +1213,24 @@ export interface OrgLimitDefault { name: string | null; max: number | null; } -export interface MembershipType { - id: number | null; - name: string | null; - description: string | null; - prefix: string | null; +export interface DevicesModule { + id: string | null; + databaseId: string | null; + schemaId: string | null; + userDevicesTableId: string | null; + deviceSettingsTableId: string | null; + userDevicesTable: string | null; + deviceSettingsTable: string | null; +} +export interface UserConnectedAccount { + id: string | null; + ownerId: string | null; + service: string | null; + identifier: string | null; + details: unknown | null; + isVerified: boolean | null; + createdAt: string | null; + updatedAt: string | null; } export interface AppMembershipDefault { id: string | null; @@ -1202,6 +1263,14 @@ export interface RateLimitsModule { ipRateLimitsTable: string | null; rateLimitsTable: string | null; } +export interface MembershipType { + id: number | null; + name: string | null; + description: string | null; + prefix: string | null; + parentMembershipType: number | null; + hasUsersTableEntry: boolean | null; +} export interface OrgMembershipDefault { id: string | null; createdAt: string | null; @@ -1280,6 +1349,7 @@ export interface AppMembership { isDisabled: boolean | null; isVerified: boolean | null; isActive: boolean | null; + isExternal: boolean | null; isOwner: boolean | null; isAdmin: boolean | null; permissions: string | null; diff --git a/sdk/constructive-sdk/schemas/admin.graphql b/sdk/constructive-sdk/schemas/admin.graphql index c6dce4f61..1c4219ba1 100644 --- a/sdk/constructive-sdk/schemas/admin.graphql +++ b/sdk/constructive-sdk/schemas/admin.graphql @@ -1352,94 +1352,6 @@ enum OrgOwnerGrantOrderBy { UPDATED_AT_DESC } -"""A connection to a list of `MembershipType` values.""" -type MembershipTypeConnection { - """A list of `MembershipType` objects.""" - nodes: [MembershipType]! - - """ - A list of edges which contains the `MembershipType` and cursor to aid in pagination. - """ - edges: [MembershipTypeEdge]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """The count of *all* `MembershipType` you could get from the connection.""" - totalCount: Int! -} - -""" -Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) -""" -type MembershipType { - """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) - """ - id: Int! - - """Human-readable name of the membership type""" - name: String! - - """Description of what this membership type represents""" - description: String! - - """ - Short prefix used to namespace tables and functions for this membership scope - """ - prefix: String! -} - -"""A `MembershipType` edge in the connection.""" -type MembershipTypeEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `MembershipType` at the end of the edge.""" - node: MembershipType -} - -""" -A filter to be used against `MembershipType` object types. All fields are combined with a logical ‘and.’ -""" -input MembershipTypeFilter { - """Filter by the object’s `id` field.""" - id: IntFilter - - """Filter by the object’s `name` field.""" - name: StringFilter - - """Filter by the object’s `description` field.""" - description: StringFilter - - """Filter by the object’s `prefix` field.""" - prefix: StringFilter - - """Checks for all expressions in this list.""" - and: [MembershipTypeFilter!] - - """Checks for any expressions in this list.""" - or: [MembershipTypeFilter!] - - """Negates the expression.""" - not: MembershipTypeFilter -} - -"""Methods to use when ordering `MembershipType`.""" -enum MembershipTypeOrderBy { - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - ID_ASC - ID_DESC - NAME_ASC - NAME_DESC - DESCRIPTION_ASC - DESCRIPTION_DESC - PREFIX_ASC - PREFIX_DESC -} - """ A filter to be used against `AppPermission` object types. All fields are combined with a logical ‘and.’ """ @@ -2128,6 +2040,114 @@ enum OrgLimitOrderBy { ENTITY_ID_DESC } +"""A connection to a list of `MembershipType` values.""" +type MembershipTypeConnection { + """A list of `MembershipType` objects.""" + nodes: [MembershipType]! + + """ + A list of edges which contains the `MembershipType` and cursor to aid in pagination. + """ + edges: [MembershipTypeEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `MembershipType` you could get from the connection.""" + totalCount: Int! +} + +""" +Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) +""" +type MembershipType { + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int! + + """Human-readable name of the membership type""" + name: String! + + """Description of what this membership type represents""" + description: String! + + """ + Short prefix used to namespace tables and functions for this membership scope + """ + prefix: String! + + """ + Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + """ + parentMembershipType: Int + + """ + When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs + """ + hasUsersTableEntry: Boolean! +} + +"""A `MembershipType` edge in the connection.""" +type MembershipTypeEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `MembershipType` at the end of the edge.""" + node: MembershipType +} + +""" +A filter to be used against `MembershipType` object types. All fields are combined with a logical ‘and.’ +""" +input MembershipTypeFilter { + """Filter by the object’s `id` field.""" + id: IntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Filter by the object’s `description` field.""" + description: StringFilter + + """Filter by the object’s `prefix` field.""" + prefix: StringFilter + + """Filter by the object’s `parentMembershipType` field.""" + parentMembershipType: IntFilter + + """Filter by the object’s `hasUsersTableEntry` field.""" + hasUsersTableEntry: BooleanFilter + + """Checks for all expressions in this list.""" + and: [MembershipTypeFilter!] + + """Checks for any expressions in this list.""" + or: [MembershipTypeFilter!] + + """Negates the expression.""" + not: MembershipTypeFilter +} + +"""Methods to use when ordering `MembershipType`.""" +enum MembershipTypeOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + NAME_ASC + NAME_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + PREFIX_ASC + PREFIX_DESC + PARENT_MEMBERSHIP_TYPE_ASC + PARENT_MEMBERSHIP_TYPE_DESC + HAS_USERS_TABLE_ENTRY_ASC + HAS_USERS_TABLE_ENTRY_DESC +} + """A connection to a list of `AppGrant` values.""" type AppGrantConnection { """A list of `AppGrant` objects.""" @@ -2834,88 +2854,185 @@ enum OrgMembershipDefaultOrderBy { CREATE_GROUPS_CASCADE_MEMBERS_DESC } -"""A connection to a list of `AppLevel` values.""" -type AppLevelConnection { - """A list of `AppLevel` objects.""" - nodes: [AppLevel]! +"""A connection to a list of `OrgMemberProfile` values.""" +type OrgMemberProfileConnection { + """A list of `OrgMemberProfile` objects.""" + nodes: [OrgMemberProfile]! """ - A list of edges which contains the `AppLevel` and cursor to aid in pagination. + A list of edges which contains the `OrgMemberProfile` and cursor to aid in pagination. """ - edges: [AppLevelEdge]! + edges: [OrgMemberProfileEdge]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `AppLevel` you could get from the connection.""" + """ + The count of *all* `OrgMemberProfile` you could get from the connection. + """ totalCount: Int! } """ -Defines available levels that users can achieve by completing requirements +Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) """ -type AppLevel { +type OrgMemberProfile { id: UUID! + createdAt: Datetime + updatedAt: Datetime - """Unique name of the level""" - name: String! + """References the membership this profile belongs to (1:1)""" + membershipId: UUID! - """Human-readable description of what this level represents""" - description: String + """References the entity this profile belongs to (used for RLS lookups)""" + entityId: UUID! - """Badge or icon image associated with this level""" - image: ConstructiveInternalTypeImage + """References the user who owns this profile (for self-edit RLS)""" + actorId: UUID! - """Optional owner (actor) who created or manages this level""" - ownerId: UUID - createdAt: Datetime - updatedAt: Datetime -} + """Display name shown to other entity members""" + displayName: String -scalar ConstructiveInternalTypeImage + """ + Email address visible to other entity members (auto-populated from verified primary email) + """ + email: String -"""A `AppLevel` edge in the connection.""" -type AppLevelEdge { - """A cursor for use in pagination.""" - cursor: Cursor + """Job title or role description visible to other entity members""" + title: String - """The `AppLevel` at the end of the edge.""" - node: AppLevel + """Short biography visible to other entity members""" + bio: String + + """Profile picture visible to other entity members""" + profilePicture: ConstructiveInternalTypeImage + + """ + Reads a single `OrgMembership` that is related to this `OrgMemberProfile`. + """ + membership: OrgMembership } +scalar ConstructiveInternalTypeImage + """ -A filter to be used against `AppLevel` object types. All fields are combined with a logical ‘and.’ +Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status """ -input AppLevelFilter { - """Filter by the object’s `id` field.""" - id: UUIDFilter +type OrgMembership { + id: UUID! + createdAt: Datetime + updatedAt: Datetime + createdBy: UUID + updatedBy: UUID - """Filter by the object’s `name` field.""" - name: StringFilter + """Whether this membership has been approved by an admin""" + isApproved: Boolean! - """Filter by the object’s `description` field.""" - description: StringFilter + """Whether this member has been banned from the entity""" + isBanned: Boolean! - """Filter by the object’s `image` field.""" - image: ConstructiveInternalTypeImageFilter + """Whether this membership is temporarily disabled""" + isDisabled: Boolean! - """Filter by the object’s `ownerId` field.""" - ownerId: UUIDFilter + """ + Computed field indicating the membership is approved, verified, not banned, and not disabled + """ + isActive: Boolean! - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean! + + """Whether the actor is the owner of this entity""" + isOwner: Boolean! + + """Whether the actor has admin privileges on this entity""" + isAdmin: Boolean! + + """ + Aggregated permission bitmask combining profile-based and directly granted permissions + """ + permissions: BitString! + + """ + Bitmask of permissions directly granted to this member (not from profiles) + """ + granted: BitString! + + """References the user who holds this membership""" + actorId: UUID! + + """References the entity (org or group) this membership belongs to""" + entityId: UUID! + + """Whether this member has read-only access (blocks mutations when true)""" + isReadOnly: Boolean! + profileId: UUID + + """ + Reads a single `OrgMemberProfile` that is related to this `OrgMembership`. + """ + orgMemberProfileByMembershipId: OrgMemberProfile +} + +"""A `OrgMemberProfile` edge in the connection.""" +type OrgMemberProfileEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgMemberProfile` at the end of the edge.""" + node: OrgMemberProfile +} + +""" +A filter to be used against `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ +""" +input OrgMemberProfileFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter """Filter by the object’s `updatedAt` field.""" updatedAt: DatetimeFilter + """Filter by the object’s `membershipId` field.""" + membershipId: UUIDFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Filter by the object’s `displayName` field.""" + displayName: StringFilter + + """Filter by the object’s `email` field.""" + email: StringFilter + + """Filter by the object’s `title` field.""" + title: StringFilter + + """Filter by the object’s `bio` field.""" + bio: StringFilter + + """Filter by the object’s `profilePicture` field.""" + profilePicture: ConstructiveInternalTypeImageFilter + """Checks for all expressions in this list.""" - and: [AppLevelFilter!] + and: [OrgMemberProfileFilter!] """Checks for any expressions in this list.""" - or: [AppLevelFilter!] + or: [OrgMemberProfileFilter!] """Negates the expression.""" - not: AppLevelFilter + not: OrgMemberProfileFilter + + """Filter by the object’s `membership` relation.""" + membership: OrgMembershipFilter } """ @@ -2975,6 +3092,191 @@ input ConstructiveInternalTypeImageFilter { containedBy: ConstructiveInternalTypeImage } +""" +A filter to be used against `OrgMembership` object types. All fields are combined with a logical ‘and.’ +""" +input OrgMembershipFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `createdBy` field.""" + createdBy: UUIDFilter + + """Filter by the object’s `updatedBy` field.""" + updatedBy: UUIDFilter + + """Filter by the object’s `isApproved` field.""" + isApproved: BooleanFilter + + """Filter by the object’s `isBanned` field.""" + isBanned: BooleanFilter + + """Filter by the object’s `isDisabled` field.""" + isDisabled: BooleanFilter + + """Filter by the object’s `isActive` field.""" + isActive: BooleanFilter + + """Filter by the object’s `isExternal` field.""" + isExternal: BooleanFilter + + """Filter by the object’s `isOwner` field.""" + isOwner: BooleanFilter + + """Filter by the object’s `isAdmin` field.""" + isAdmin: BooleanFilter + + """Filter by the object’s `permissions` field.""" + permissions: BitStringFilter + + """Filter by the object’s `granted` field.""" + granted: BitStringFilter + + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `isReadOnly` field.""" + isReadOnly: BooleanFilter + + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [OrgMembershipFilter!] + + """Checks for any expressions in this list.""" + or: [OrgMembershipFilter!] + + """Negates the expression.""" + not: OrgMembershipFilter + + """Filter by the object’s `orgMemberProfileByMembershipId` relation.""" + orgMemberProfileByMembershipId: OrgMemberProfileFilter + + """A related `orgMemberProfileByMembershipId` exists.""" + orgMemberProfileByMembershipIdExists: Boolean +} + +"""Methods to use when ordering `OrgMemberProfile`.""" +enum OrgMemberProfileOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + MEMBERSHIP_ID_ASC + MEMBERSHIP_ID_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ACTOR_ID_ASC + ACTOR_ID_DESC + DISPLAY_NAME_ASC + DISPLAY_NAME_DESC + EMAIL_ASC + EMAIL_DESC + TITLE_ASC + TITLE_DESC + BIO_ASC + BIO_DESC + PROFILE_PICTURE_ASC + PROFILE_PICTURE_DESC +} + +"""A connection to a list of `AppLevel` values.""" +type AppLevelConnection { + """A list of `AppLevel` objects.""" + nodes: [AppLevel]! + + """ + A list of edges which contains the `AppLevel` and cursor to aid in pagination. + """ + edges: [AppLevelEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `AppLevel` you could get from the connection.""" + totalCount: Int! +} + +""" +Defines available levels that users can achieve by completing requirements +""" +type AppLevel { + id: UUID! + + """Unique name of the level""" + name: String! + + """Human-readable description of what this level represents""" + description: String + + """Badge or icon image associated with this level""" + image: ConstructiveInternalTypeImage + + """Optional owner (actor) who created or manages this level""" + ownerId: UUID + createdAt: Datetime + updatedAt: Datetime +} + +"""A `AppLevel` edge in the connection.""" +type AppLevelEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `AppLevel` at the end of the edge.""" + node: AppLevel +} + +""" +A filter to be used against `AppLevel` object types. All fields are combined with a logical ‘and.’ +""" +input AppLevelFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Filter by the object’s `description` field.""" + description: StringFilter + + """Filter by the object’s `image` field.""" + image: ConstructiveInternalTypeImageFilter + + """Filter by the object’s `ownerId` field.""" + ownerId: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Checks for all expressions in this list.""" + and: [AppLevelFilter!] + + """Checks for any expressions in this list.""" + or: [AppLevelFilter!] + + """Negates the expression.""" + not: AppLevelFilter +} + """Methods to use when ordering `AppLevel`.""" enum AppLevelOrderBy { NATURAL @@ -3270,202 +3572,181 @@ enum AppInviteOrderBy { UPDATED_AT_DESC } -"""A connection to a list of `AppMembership` values.""" -type AppMembershipConnection { - """A list of `AppMembership` objects.""" - nodes: [AppMembership]! +"""A connection to a list of `OrgInvite` values.""" +type OrgInviteConnection { + """A list of `OrgInvite` objects.""" + nodes: [OrgInvite]! """ - A list of edges which contains the `AppMembership` and cursor to aid in pagination. + A list of edges which contains the `OrgInvite` and cursor to aid in pagination. """ - edges: [AppMembershipEdge]! + edges: [OrgInviteEdge]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `AppMembership` you could get from the connection.""" + """The count of *all* `OrgInvite` you could get from the connection.""" totalCount: Int! } """ -Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status +Invitation records sent to prospective members via email, with token-based redemption and expiration """ -type AppMembership { +type OrgInvite { id: UUID! - createdAt: Datetime - updatedAt: Datetime - createdBy: UUID - updatedBy: UUID - """Whether this membership has been approved by an admin""" - isApproved: Boolean! + """Email address of the invited recipient""" + email: ConstructiveInternalTypeEmail - """Whether this member has been banned from the entity""" - isBanned: Boolean! + """User ID of the member who sent this invitation""" + senderId: UUID! - """Whether this membership is temporarily disabled""" - isDisabled: Boolean! + """User ID of the intended recipient, if targeting a specific user""" + receiverId: UUID - """Whether this member has been verified (e.g. email confirmation)""" - isVerified: Boolean! + """Unique random hex token used to redeem this invitation""" + inviteToken: String! - """ - Computed field indicating the membership is approved, verified, not banned, and not disabled - """ - isActive: Boolean! + """Whether this invitation is still valid and can be redeemed""" + inviteValid: Boolean! - """Whether the actor is the owner of this entity""" - isOwner: Boolean! + """Maximum number of times this invite can be claimed; -1 means unlimited""" + inviteLimit: Int! - """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean! + """Running count of how many times this invite has been claimed""" + inviteCount: Int! - """ - Aggregated permission bitmask combining profile-based and directly granted permissions - """ - permissions: BitString! + """Whether this invite can be claimed by multiple recipients""" + multiple: Boolean! - """ - Bitmask of permissions directly granted to this member (not from profiles) - """ - granted: BitString! + """Optional JSON payload of additional invite metadata""" + data: JSON - """References the user who holds this membership""" - actorId: UUID! - profileId: UUID + """Timestamp after which this invitation can no longer be redeemed""" + expiresAt: Datetime! + createdAt: Datetime + updatedAt: Datetime + entityId: UUID! } -"""A `AppMembership` edge in the connection.""" -type AppMembershipEdge { +"""A `OrgInvite` edge in the connection.""" +type OrgInviteEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `AppMembership` at the end of the edge.""" - node: AppMembership + """The `OrgInvite` at the end of the edge.""" + node: OrgInvite } """ -A filter to be used against `AppMembership` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `OrgInvite` object types. All fields are combined with a logical ‘and.’ """ -input AppMembershipFilter { +input OrgInviteFilter { """Filter by the object’s `id` field.""" id: UUIDFilter - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter - - """Filter by the object’s `createdBy` field.""" - createdBy: UUIDFilter - - """Filter by the object’s `updatedBy` field.""" - updatedBy: UUIDFilter + """Filter by the object’s `email` field.""" + email: ConstructiveInternalTypeEmailFilter - """Filter by the object’s `isApproved` field.""" - isApproved: BooleanFilter + """Filter by the object’s `senderId` field.""" + senderId: UUIDFilter - """Filter by the object’s `isBanned` field.""" - isBanned: BooleanFilter + """Filter by the object’s `receiverId` field.""" + receiverId: UUIDFilter - """Filter by the object’s `isDisabled` field.""" - isDisabled: BooleanFilter + """Filter by the object’s `inviteToken` field.""" + inviteToken: StringFilter - """Filter by the object’s `isVerified` field.""" - isVerified: BooleanFilter + """Filter by the object’s `inviteValid` field.""" + inviteValid: BooleanFilter - """Filter by the object’s `isActive` field.""" - isActive: BooleanFilter + """Filter by the object’s `inviteLimit` field.""" + inviteLimit: IntFilter - """Filter by the object’s `isOwner` field.""" - isOwner: BooleanFilter + """Filter by the object’s `inviteCount` field.""" + inviteCount: IntFilter - """Filter by the object’s `isAdmin` field.""" - isAdmin: BooleanFilter + """Filter by the object’s `multiple` field.""" + multiple: BooleanFilter - """Filter by the object’s `permissions` field.""" - permissions: BitStringFilter + """Filter by the object’s `expiresAt` field.""" + expiresAt: DatetimeFilter - """Filter by the object’s `granted` field.""" - granted: BitStringFilter + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter - """Filter by the object’s `profileId` field.""" - profileId: UUIDFilter + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter """Checks for all expressions in this list.""" - and: [AppMembershipFilter!] + and: [OrgInviteFilter!] """Checks for any expressions in this list.""" - or: [AppMembershipFilter!] + or: [OrgInviteFilter!] """Negates the expression.""" - not: AppMembershipFilter + not: OrgInviteFilter } -"""Methods to use when ordering `AppMembership`.""" -enum AppMembershipOrderBy { +"""Methods to use when ordering `OrgInvite`.""" +enum OrgInviteOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC ID_ASC ID_DESC + EMAIL_ASC + EMAIL_DESC + SENDER_ID_ASC + SENDER_ID_DESC + RECEIVER_ID_ASC + RECEIVER_ID_DESC + INVITE_TOKEN_ASC + INVITE_TOKEN_DESC + INVITE_VALID_ASC + INVITE_VALID_DESC + INVITE_LIMIT_ASC + INVITE_LIMIT_DESC + INVITE_COUNT_ASC + INVITE_COUNT_DESC + MULTIPLE_ASC + MULTIPLE_DESC + DATA_ASC + DATA_DESC + EXPIRES_AT_ASC + EXPIRES_AT_DESC CREATED_AT_ASC CREATED_AT_DESC UPDATED_AT_ASC UPDATED_AT_DESC - CREATED_BY_ASC - CREATED_BY_DESC - UPDATED_BY_ASC - UPDATED_BY_DESC - IS_APPROVED_ASC - IS_APPROVED_DESC - IS_BANNED_ASC - IS_BANNED_DESC - IS_DISABLED_ASC - IS_DISABLED_DESC - IS_VERIFIED_ASC - IS_VERIFIED_DESC - IS_ACTIVE_ASC - IS_ACTIVE_DESC - IS_OWNER_ASC - IS_OWNER_DESC - IS_ADMIN_ASC - IS_ADMIN_DESC - PERMISSIONS_ASC - PERMISSIONS_DESC - GRANTED_ASC - GRANTED_DESC - ACTOR_ID_ASC - ACTOR_ID_DESC - PROFILE_ID_ASC - PROFILE_ID_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC } -"""A connection to a list of `OrgMembership` values.""" -type OrgMembershipConnection { - """A list of `OrgMembership` objects.""" - nodes: [OrgMembership]! +"""A connection to a list of `AppMembership` values.""" +type AppMembershipConnection { + """A list of `AppMembership` objects.""" + nodes: [AppMembership]! """ - A list of edges which contains the `OrgMembership` and cursor to aid in pagination. + A list of edges which contains the `AppMembership` and cursor to aid in pagination. """ - edges: [OrgMembershipEdge]! + edges: [AppMembershipEdge]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `OrgMembership` you could get from the connection.""" + """The count of *all* `AppMembership` you could get from the connection.""" totalCount: Int! } """ Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status """ -type OrgMembership { +type AppMembership { id: UUID! createdAt: Datetime updatedAt: Datetime @@ -3481,11 +3762,19 @@ type OrgMembership { """Whether this membership is temporarily disabled""" isDisabled: Boolean! + """Whether this member has been verified (e.g. email confirmation)""" + isVerified: Boolean! + """ Computed field indicating the membership is approved, verified, not banned, and not disabled """ isActive: Boolean! + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean! + """Whether the actor is the owner of this entity""" isOwner: Boolean! @@ -3504,25 +3793,22 @@ type OrgMembership { """References the user who holds this membership""" actorId: UUID! - - """References the entity (org or group) this membership belongs to""" - entityId: UUID! profileId: UUID } -"""A `OrgMembership` edge in the connection.""" -type OrgMembershipEdge { +"""A `AppMembership` edge in the connection.""" +type AppMembershipEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `OrgMembership` at the end of the edge.""" - node: OrgMembership + """The `AppMembership` at the end of the edge.""" + node: AppMembership } """ -A filter to be used against `OrgMembership` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `AppMembership` object types. All fields are combined with a logical ‘and.’ """ -input OrgMembershipFilter { +input AppMembershipFilter { """Filter by the object’s `id` field.""" id: UUIDFilter @@ -3547,231 +3833,151 @@ input OrgMembershipFilter { """Filter by the object’s `isDisabled` field.""" isDisabled: BooleanFilter + """Filter by the object’s `isVerified` field.""" + isVerified: BooleanFilter + """Filter by the object’s `isActive` field.""" isActive: BooleanFilter - """Filter by the object’s `isOwner` field.""" - isOwner: BooleanFilter - - """Filter by the object’s `isAdmin` field.""" - isAdmin: BooleanFilter - - """Filter by the object’s `permissions` field.""" - permissions: BitStringFilter - - """Filter by the object’s `granted` field.""" - granted: BitStringFilter - - """Filter by the object’s `actorId` field.""" - actorId: UUIDFilter - - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter - - """Filter by the object’s `profileId` field.""" - profileId: UUIDFilter - - """Checks for all expressions in this list.""" - and: [OrgMembershipFilter!] - - """Checks for any expressions in this list.""" - or: [OrgMembershipFilter!] - - """Negates the expression.""" - not: OrgMembershipFilter -} - -"""Methods to use when ordering `OrgMembership`.""" -enum OrgMembershipOrderBy { - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - ID_ASC - ID_DESC - CREATED_AT_ASC - CREATED_AT_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC - CREATED_BY_ASC - CREATED_BY_DESC - UPDATED_BY_ASC - UPDATED_BY_DESC - IS_APPROVED_ASC - IS_APPROVED_DESC - IS_BANNED_ASC - IS_BANNED_DESC - IS_DISABLED_ASC - IS_DISABLED_DESC - IS_ACTIVE_ASC - IS_ACTIVE_DESC - IS_OWNER_ASC - IS_OWNER_DESC - IS_ADMIN_ASC - IS_ADMIN_DESC - PERMISSIONS_ASC - PERMISSIONS_DESC - GRANTED_ASC - GRANTED_DESC - ACTOR_ID_ASC - ACTOR_ID_DESC - ENTITY_ID_ASC - ENTITY_ID_DESC - PROFILE_ID_ASC - PROFILE_ID_DESC -} - -"""A connection to a list of `OrgInvite` values.""" -type OrgInviteConnection { - """A list of `OrgInvite` objects.""" - nodes: [OrgInvite]! - - """ - A list of edges which contains the `OrgInvite` and cursor to aid in pagination. - """ - edges: [OrgInviteEdge]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """The count of *all* `OrgInvite` you could get from the connection.""" - totalCount: Int! -} - -""" -Invitation records sent to prospective members via email, with token-based redemption and expiration -""" -type OrgInvite { - id: UUID! - - """Email address of the invited recipient""" - email: ConstructiveInternalTypeEmail - - """User ID of the member who sent this invitation""" - senderId: UUID! - - """User ID of the intended recipient, if targeting a specific user""" - receiverId: UUID - - """Unique random hex token used to redeem this invitation""" - inviteToken: String! - - """Whether this invitation is still valid and can be redeemed""" - inviteValid: Boolean! - - """Maximum number of times this invite can be claimed; -1 means unlimited""" - inviteLimit: Int! - - """Running count of how many times this invite has been claimed""" - inviteCount: Int! - - """Whether this invite can be claimed by multiple recipients""" - multiple: Boolean! - - """Optional JSON payload of additional invite metadata""" - data: JSON - - """Timestamp after which this invitation can no longer be redeemed""" - expiresAt: Datetime! - createdAt: Datetime - updatedAt: Datetime - entityId: UUID! -} - -"""A `OrgInvite` edge in the connection.""" -type OrgInviteEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `OrgInvite` at the end of the edge.""" - node: OrgInvite -} - -""" -A filter to be used against `OrgInvite` object types. All fields are combined with a logical ‘and.’ -""" -input OrgInviteFilter { - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `email` field.""" - email: ConstructiveInternalTypeEmailFilter - - """Filter by the object’s `senderId` field.""" - senderId: UUIDFilter - - """Filter by the object’s `receiverId` field.""" - receiverId: UUIDFilter - - """Filter by the object’s `inviteToken` field.""" - inviteToken: StringFilter - - """Filter by the object’s `inviteValid` field.""" - inviteValid: BooleanFilter - - """Filter by the object’s `inviteLimit` field.""" - inviteLimit: IntFilter + """Filter by the object’s `isExternal` field.""" + isExternal: BooleanFilter - """Filter by the object’s `inviteCount` field.""" - inviteCount: IntFilter + """Filter by the object’s `isOwner` field.""" + isOwner: BooleanFilter - """Filter by the object’s `multiple` field.""" - multiple: BooleanFilter + """Filter by the object’s `isAdmin` field.""" + isAdmin: BooleanFilter - """Filter by the object’s `expiresAt` field.""" - expiresAt: DatetimeFilter + """Filter by the object’s `permissions` field.""" + permissions: BitStringFilter - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter + """Filter by the object’s `granted` field.""" + granted: BitStringFilter - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter - """Filter by the object’s `entityId` field.""" - entityId: UUIDFilter + """Filter by the object’s `profileId` field.""" + profileId: UUIDFilter """Checks for all expressions in this list.""" - and: [OrgInviteFilter!] + and: [AppMembershipFilter!] """Checks for any expressions in this list.""" - or: [OrgInviteFilter!] + or: [AppMembershipFilter!] """Negates the expression.""" - not: OrgInviteFilter + not: AppMembershipFilter } -"""Methods to use when ordering `OrgInvite`.""" -enum OrgInviteOrderBy { +"""Methods to use when ordering `AppMembership`.""" +enum AppMembershipOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + CREATED_BY_ASC + CREATED_BY_DESC + UPDATED_BY_ASC + UPDATED_BY_DESC + IS_APPROVED_ASC + IS_APPROVED_DESC + IS_BANNED_ASC + IS_BANNED_DESC + IS_DISABLED_ASC + IS_DISABLED_DESC + IS_VERIFIED_ASC + IS_VERIFIED_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + IS_EXTERNAL_ASC + IS_EXTERNAL_DESC + IS_OWNER_ASC + IS_OWNER_DESC + IS_ADMIN_ASC + IS_ADMIN_DESC + PERMISSIONS_ASC + PERMISSIONS_DESC + GRANTED_ASC + GRANTED_DESC + ACTOR_ID_ASC + ACTOR_ID_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC +} + +"""A connection to a list of `OrgMembership` values.""" +type OrgMembershipConnection { + """A list of `OrgMembership` objects.""" + nodes: [OrgMembership]! + + """ + A list of edges which contains the `OrgMembership` and cursor to aid in pagination. + """ + edges: [OrgMembershipEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `OrgMembership` you could get from the connection.""" + totalCount: Int! +} + +"""A `OrgMembership` edge in the connection.""" +type OrgMembershipEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgMembership` at the end of the edge.""" + node: OrgMembership +} + +"""Methods to use when ordering `OrgMembership`.""" +enum OrgMembershipOrderBy { NATURAL PRIMARY_KEY_ASC PRIMARY_KEY_DESC ID_ASC ID_DESC - EMAIL_ASC - EMAIL_DESC - SENDER_ID_ASC - SENDER_ID_DESC - RECEIVER_ID_ASC - RECEIVER_ID_DESC - INVITE_TOKEN_ASC - INVITE_TOKEN_DESC - INVITE_VALID_ASC - INVITE_VALID_DESC - INVITE_LIMIT_ASC - INVITE_LIMIT_DESC - INVITE_COUNT_ASC - INVITE_COUNT_DESC - MULTIPLE_ASC - MULTIPLE_DESC - DATA_ASC - DATA_DESC - EXPIRES_AT_ASC - EXPIRES_AT_DESC CREATED_AT_ASC CREATED_AT_DESC UPDATED_AT_ASC UPDATED_AT_DESC + CREATED_BY_ASC + CREATED_BY_DESC + UPDATED_BY_ASC + UPDATED_BY_DESC + IS_APPROVED_ASC + IS_APPROVED_DESC + IS_BANNED_ASC + IS_BANNED_DESC + IS_DISABLED_ASC + IS_DISABLED_DESC + IS_ACTIVE_ASC + IS_ACTIVE_DESC + IS_EXTERNAL_ASC + IS_EXTERNAL_DESC + IS_OWNER_ASC + IS_OWNER_DESC + IS_ADMIN_ASC + IS_ADMIN_DESC + PERMISSIONS_ASC + PERMISSIONS_DESC + GRANTED_ASC + GRANTED_DESC + ACTOR_ID_ASC + ACTOR_ID_DESC ENTITY_ID_ASC ENTITY_ID_DESC + IS_READ_ONLY_ASC + IS_READ_ONLY_DESC + PROFILE_ID_ASC + PROFILE_ID_DESC } """Root meta schema type""" @@ -4406,60 +4612,6 @@ input OrgOwnerGrantInput { updatedAt: Datetime } -"""The output of our create `MembershipType` mutation.""" -type CreateMembershipTypePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `MembershipType` that was created by this mutation.""" - membershipType: MembershipType - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `MembershipType`. May be used by Relay 1.""" - membershipTypeEdge( - """The method to use when ordering `MembershipType`.""" - orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] - ): MembershipTypeEdge -} - -"""All input for the create `MembershipType` mutation.""" -input CreateMembershipTypeInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `MembershipType` to be created by this mutation.""" - membershipType: MembershipTypeInput! -} - -"""An input for mutations affecting `MembershipType`""" -input MembershipTypeInput { - """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) - """ - id: Int! - - """Human-readable name of the membership type""" - name: String! - - """Description of what this membership type represents""" - description: String! - - """ - Short prefix used to namespace tables and functions for this membership scope - """ - prefix: String! -} - """The output of our create `AppPermission` mutation.""" type CreateAppPermissionPayload { """ @@ -4887,9 +5039,73 @@ input OrgLimitInput { """Current usage count for this actor and limit""" num: Int - """Maximum allowed usage; NULL means use the default limit value""" - max: Int - entityId: UUID! + """Maximum allowed usage; NULL means use the default limit value""" + max: Int + entityId: UUID! +} + +"""The output of our create `MembershipType` mutation.""" +type CreateMembershipTypePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `MembershipType` that was created by this mutation.""" + membershipType: MembershipType + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `MembershipType`. May be used by Relay 1.""" + membershipTypeEdge( + """The method to use when ordering `MembershipType`.""" + orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): MembershipTypeEdge +} + +"""All input for the create `MembershipType` mutation.""" +input CreateMembershipTypeInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `MembershipType` to be created by this mutation.""" + membershipType: MembershipTypeInput! +} + +"""An input for mutations affecting `MembershipType`""" +input MembershipTypeInput { + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int! + + """Human-readable name of the membership type""" + name: String! + + """Description of what this membership type represents""" + description: String! + + """ + Short prefix used to namespace tables and functions for this membership scope + """ + prefix: String! + + """ + Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + """ + parentMembershipType: Int + + """ + When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs + """ + hasUsersTableEntry: Boolean } """The output of our create `AppGrant` mutation.""" @@ -5277,6 +5493,74 @@ input OrgMembershipDefaultInput { createGroupsCascadeMembers: Boolean } +"""The output of our create `OrgMemberProfile` mutation.""" +type CreateOrgMemberProfilePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgMemberProfile` that was created by this mutation.""" + orgMemberProfile: OrgMemberProfile + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `OrgMemberProfile`. May be used by Relay 1.""" + orgMemberProfileEdge( + """The method to use when ordering `OrgMemberProfile`.""" + orderBy: [OrgMemberProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMemberProfileEdge +} + +"""All input for the create `OrgMemberProfile` mutation.""" +input CreateOrgMemberProfileInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `OrgMemberProfile` to be created by this mutation.""" + orgMemberProfile: OrgMemberProfileInput! +} + +"""An input for mutations affecting `OrgMemberProfile`""" +input OrgMemberProfileInput { + id: UUID + createdAt: Datetime + updatedAt: Datetime + + """References the membership this profile belongs to (1:1)""" + membershipId: UUID! + + """References the entity this profile belongs to (used for RLS lookups)""" + entityId: UUID! + + """References the user who owns this profile (for self-edit RLS)""" + actorId: UUID! + + """Display name shown to other entity members""" + displayName: String + + """ + Email address visible to other entity members (auto-populated from verified primary email) + """ + email: String + + """Job title or role description visible to other entity members""" + title: String + + """Short biography visible to other entity members""" + bio: String + + """Profile picture visible to other entity members""" + profilePicture: ConstructiveInternalTypeImage +} + """The output of our create `AppLevel` mutation.""" type CreateAppLevelPayload { """ @@ -5400,6 +5684,79 @@ input AppInviteInput { updatedAt: Datetime } +"""The output of our create `OrgInvite` mutation.""" +type CreateOrgInvitePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgInvite` that was created by this mutation.""" + orgInvite: OrgInvite + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `OrgInvite`. May be used by Relay 1.""" + orgInviteEdge( + """The method to use when ordering `OrgInvite`.""" + orderBy: [OrgInviteOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgInviteEdge +} + +"""All input for the create `OrgInvite` mutation.""" +input CreateOrgInviteInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `OrgInvite` to be created by this mutation.""" + orgInvite: OrgInviteInput! +} + +"""An input for mutations affecting `OrgInvite`""" +input OrgInviteInput { + id: UUID + + """Email address of the invited recipient""" + email: ConstructiveInternalTypeEmail + + """User ID of the member who sent this invitation""" + senderId: UUID + + """User ID of the intended recipient, if targeting a specific user""" + receiverId: UUID + + """Unique random hex token used to redeem this invitation""" + inviteToken: String + + """Whether this invitation is still valid and can be redeemed""" + inviteValid: Boolean + + """Maximum number of times this invite can be claimed; -1 means unlimited""" + inviteLimit: Int + + """Running count of how many times this invite has been claimed""" + inviteCount: Int + + """Whether this invite can be claimed by multiple recipients""" + multiple: Boolean + + """Optional JSON payload of additional invite metadata""" + data: JSON + + """Timestamp after which this invitation can no longer be redeemed""" + expiresAt: Datetime + createdAt: Datetime + updatedAt: Datetime + entityId: UUID! +} + """The output of our create `AppMembership` mutation.""" type CreateAppMembershipPayload { """ @@ -5460,6 +5817,11 @@ input AppMembershipInput { """ isActive: Boolean + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean + """Whether the actor is the owner of this entity""" isOwner: Boolean @@ -5538,6 +5900,11 @@ input OrgMembershipInput { """ isActive: Boolean + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean + """Whether the actor is the owner of this entity""" isOwner: Boolean @@ -5559,80 +5926,10 @@ input OrgMembershipInput { """References the entity (org or group) this membership belongs to""" entityId: UUID! - profileId: UUID -} - -"""The output of our create `OrgInvite` mutation.""" -type CreateOrgInvitePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `OrgInvite` that was created by this mutation.""" - orgInvite: OrgInvite - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `OrgInvite`. May be used by Relay 1.""" - orgInviteEdge( - """The method to use when ordering `OrgInvite`.""" - orderBy: [OrgInviteOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgInviteEdge -} - -"""All input for the create `OrgInvite` mutation.""" -input CreateOrgInviteInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `OrgInvite` to be created by this mutation.""" - orgInvite: OrgInviteInput! -} - -"""An input for mutations affecting `OrgInvite`""" -input OrgInviteInput { - id: UUID - - """Email address of the invited recipient""" - email: ConstructiveInternalTypeEmail - - """User ID of the member who sent this invitation""" - senderId: UUID - - """User ID of the intended recipient, if targeting a specific user""" - receiverId: UUID - - """Unique random hex token used to redeem this invitation""" - inviteToken: String - - """Whether this invitation is still valid and can be redeemed""" - inviteValid: Boolean - - """Maximum number of times this invite can be claimed; -1 means unlimited""" - inviteLimit: Int - - """Running count of how many times this invite has been claimed""" - inviteCount: Int - - """Whether this invite can be claimed by multiple recipients""" - multiple: Boolean - - """Optional JSON payload of additional invite metadata""" - data: JSON - """Timestamp after which this invitation can no longer be redeemed""" - expiresAt: Datetime - createdAt: Datetime - updatedAt: Datetime - entityId: UUID! + """Whether this member has read-only access (blocks mutations when true)""" + isReadOnly: Boolean + profileId: UUID } """The output of our update `OrgMember` mutation.""" @@ -6045,134 +6342,71 @@ input OrgAdminGrantPatch { """True to grant admin, false to revoke admin""" isGrant: Boolean - """The member receiving or losing the admin grant""" - actorId: UUID - - """The entity (org or group) this admin grant applies to""" - entityId: UUID - grantorId: UUID - createdAt: Datetime - updatedAt: Datetime -} - -"""The output of our update `OrgOwnerGrant` mutation.""" -type UpdateOrgOwnerGrantPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `OrgOwnerGrant` that was updated by this mutation.""" - orgOwnerGrant: OrgOwnerGrant - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `OrgOwnerGrant`. May be used by Relay 1.""" - orgOwnerGrantEdge( - """The method to use when ordering `OrgOwnerGrant`.""" - orderBy: [OrgOwnerGrantOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgOwnerGrantEdge -} - -"""All input for the `updateOrgOwnerGrant` mutation.""" -input UpdateOrgOwnerGrantInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `OrgOwnerGrant` being updated. - """ - orgOwnerGrantPatch: OrgOwnerGrantPatch! -} - -""" -Represents an update to a `OrgOwnerGrant`. Fields that are set will be updated. -""" -input OrgOwnerGrantPatch { - id: UUID - - """True to grant ownership, false to revoke ownership""" - isGrant: Boolean - - """The member receiving or losing the ownership grant""" + """The member receiving or losing the admin grant""" actorId: UUID - """The entity (org or group) this ownership grant applies to""" + """The entity (org or group) this admin grant applies to""" entityId: UUID grantorId: UUID createdAt: Datetime updatedAt: Datetime } -"""The output of our update `MembershipType` mutation.""" -type UpdateMembershipTypePayload { +"""The output of our update `OrgOwnerGrant` mutation.""" +type UpdateOrgOwnerGrantPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `MembershipType` that was updated by this mutation.""" - membershipType: MembershipType + """The `OrgOwnerGrant` that was updated by this mutation.""" + orgOwnerGrant: OrgOwnerGrant """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `MembershipType`. May be used by Relay 1.""" - membershipTypeEdge( - """The method to use when ordering `MembershipType`.""" - orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] - ): MembershipTypeEdge + """An edge for our `OrgOwnerGrant`. May be used by Relay 1.""" + orgOwnerGrantEdge( + """The method to use when ordering `OrgOwnerGrant`.""" + orderBy: [OrgOwnerGrantOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgOwnerGrantEdge } -"""All input for the `updateMembershipType` mutation.""" -input UpdateMembershipTypeInput { +"""All input for the `updateOrgOwnerGrant` mutation.""" +input UpdateOrgOwnerGrantInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String + id: UUID! """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) - """ - id: Int! - - """ - An object where the defined keys will be set on the `MembershipType` being updated. + An object where the defined keys will be set on the `OrgOwnerGrant` being updated. """ - membershipTypePatch: MembershipTypePatch! + orgOwnerGrantPatch: OrgOwnerGrantPatch! } """ -Represents an update to a `MembershipType`. Fields that are set will be updated. +Represents an update to a `OrgOwnerGrant`. Fields that are set will be updated. """ -input MembershipTypePatch { - """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) - """ - id: Int +input OrgOwnerGrantPatch { + id: UUID - """Human-readable name of the membership type""" - name: String + """True to grant ownership, false to revoke ownership""" + isGrant: Boolean - """Description of what this membership type represents""" - description: String + """The member receiving or losing the ownership grant""" + actorId: UUID - """ - Short prefix used to namespace tables and functions for this membership scope - """ - prefix: String + """The entity (org or group) this ownership grant applies to""" + entityId: UUID + grantorId: UUID + createdAt: Datetime + updatedAt: Datetime } """The output of our update `AppPermission` mutation.""" @@ -6647,6 +6881,79 @@ input OrgLimitPatch { entityId: UUID } +"""The output of our update `MembershipType` mutation.""" +type UpdateMembershipTypePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `MembershipType` that was updated by this mutation.""" + membershipType: MembershipType + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `MembershipType`. May be used by Relay 1.""" + membershipTypeEdge( + """The method to use when ordering `MembershipType`.""" + orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): MembershipTypeEdge +} + +"""All input for the `updateMembershipType` mutation.""" +input UpdateMembershipTypeInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int! + + """ + An object where the defined keys will be set on the `MembershipType` being updated. + """ + membershipTypePatch: MembershipTypePatch! +} + +""" +Represents an update to a `MembershipType`. Fields that are set will be updated. +""" +input MembershipTypePatch { + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int + + """Human-readable name of the membership type""" + name: String + + """Description of what this membership type represents""" + description: String + + """ + Short prefix used to namespace tables and functions for this membership scope + """ + prefix: String + + """ + Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + """ + parentMembershipType: Int + + """ + When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs + """ + hasUsersTableEntry: Boolean +} + """The output of our update `AppGrant` mutation.""" type UpdateAppGrantPayload { """ @@ -7067,6 +7374,85 @@ input OrgMembershipDefaultPatch { createGroupsCascadeMembers: Boolean } +"""The output of our update `OrgMemberProfile` mutation.""" +type UpdateOrgMemberProfilePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgMemberProfile` that was updated by this mutation.""" + orgMemberProfile: OrgMemberProfile + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `OrgMemberProfile`. May be used by Relay 1.""" + orgMemberProfileEdge( + """The method to use when ordering `OrgMemberProfile`.""" + orderBy: [OrgMemberProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMemberProfileEdge +} + +"""All input for the `updateOrgMemberProfile` mutation.""" +input UpdateOrgMemberProfileInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `OrgMemberProfile` being updated. + """ + orgMemberProfilePatch: OrgMemberProfilePatch! +} + +""" +Represents an update to a `OrgMemberProfile`. Fields that are set will be updated. +""" +input OrgMemberProfilePatch { + id: UUID + createdAt: Datetime + updatedAt: Datetime + + """References the membership this profile belongs to (1:1)""" + membershipId: UUID + + """References the entity this profile belongs to (used for RLS lookups)""" + entityId: UUID + + """References the user who owns this profile (for self-edit RLS)""" + actorId: UUID + + """Display name shown to other entity members""" + displayName: String + + """ + Email address visible to other entity members (auto-populated from verified primary email) + """ + email: String + + """Job title or role description visible to other entity members""" + title: String + + """Short biography visible to other entity members""" + bio: String + + """Profile picture visible to other entity members""" + profilePicture: ConstructiveInternalTypeImage + + """Upload for Profile picture visible to other entity members""" + profilePictureUpload: Upload +} + +"""The `Upload` scalar type represents a file upload.""" +scalar Upload + """The output of our update `AppLevel` mutation.""" type UpdateAppLevelPayload { """ @@ -7124,39 +7510,110 @@ input AppLevelPatch { ownerId: UUID createdAt: Datetime updatedAt: Datetime - - """Upload for Badge or icon image associated with this level""" - imageUpload: Upload + + """Upload for Badge or icon image associated with this level""" + imageUpload: Upload +} + +"""The output of our update `AppInvite` mutation.""" +type UpdateAppInvitePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `AppInvite` that was updated by this mutation.""" + appInvite: AppInvite + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `AppInvite`. May be used by Relay 1.""" + appInviteEdge( + """The method to use when ordering `AppInvite`.""" + orderBy: [AppInviteOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppInviteEdge +} + +"""All input for the `updateAppInvite` mutation.""" +input UpdateAppInviteInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `AppInvite` being updated. + """ + appInvitePatch: AppInvitePatch! +} + +""" +Represents an update to a `AppInvite`. Fields that are set will be updated. +""" +input AppInvitePatch { + id: UUID + + """Email address of the invited recipient""" + email: ConstructiveInternalTypeEmail + + """User ID of the member who sent this invitation""" + senderId: UUID + + """Unique random hex token used to redeem this invitation""" + inviteToken: String + + """Whether this invitation is still valid and can be redeemed""" + inviteValid: Boolean + + """Maximum number of times this invite can be claimed; -1 means unlimited""" + inviteLimit: Int + + """Running count of how many times this invite has been claimed""" + inviteCount: Int + + """Whether this invite can be claimed by multiple recipients""" + multiple: Boolean + + """Optional JSON payload of additional invite metadata""" + data: JSON + + """Timestamp after which this invitation can no longer be redeemed""" + expiresAt: Datetime + createdAt: Datetime + updatedAt: Datetime } -"""The `Upload` scalar type represents a file upload.""" -scalar Upload - -"""The output of our update `AppInvite` mutation.""" -type UpdateAppInvitePayload { +"""The output of our update `OrgInvite` mutation.""" +type UpdateOrgInvitePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `AppInvite` that was updated by this mutation.""" - appInvite: AppInvite + """The `OrgInvite` that was updated by this mutation.""" + orgInvite: OrgInvite """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `AppInvite`. May be used by Relay 1.""" - appInviteEdge( - """The method to use when ordering `AppInvite`.""" - orderBy: [AppInviteOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppInviteEdge + """An edge for our `OrgInvite`. May be used by Relay 1.""" + orgInviteEdge( + """The method to use when ordering `OrgInvite`.""" + orderBy: [OrgInviteOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgInviteEdge } -"""All input for the `updateAppInvite` mutation.""" -input UpdateAppInviteInput { +"""All input for the `updateOrgInvite` mutation.""" +input UpdateOrgInviteInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -7165,15 +7622,15 @@ input UpdateAppInviteInput { id: UUID! """ - An object where the defined keys will be set on the `AppInvite` being updated. + An object where the defined keys will be set on the `OrgInvite` being updated. """ - appInvitePatch: AppInvitePatch! + orgInvitePatch: OrgInvitePatch! } """ -Represents an update to a `AppInvite`. Fields that are set will be updated. +Represents an update to a `OrgInvite`. Fields that are set will be updated. """ -input AppInvitePatch { +input OrgInvitePatch { id: UUID """Email address of the invited recipient""" @@ -7182,6 +7639,9 @@ input AppInvitePatch { """User ID of the member who sent this invitation""" senderId: UUID + """User ID of the intended recipient, if targeting a specific user""" + receiverId: UUID + """Unique random hex token used to redeem this invitation""" inviteToken: String @@ -7204,6 +7664,7 @@ input AppInvitePatch { expiresAt: Datetime createdAt: Datetime updatedAt: Datetime + entityId: UUID } """The output of our update `AppMembership` mutation.""" @@ -7271,6 +7732,11 @@ input AppMembershipPatch { """ isActive: Boolean + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean + """Whether the actor is the owner of this entity""" isOwner: Boolean @@ -7354,6 +7820,11 @@ input OrgMembershipPatch { """ isActive: Boolean + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean + """Whether the actor is the owner of this entity""" isOwner: Boolean @@ -7375,85 +7846,10 @@ input OrgMembershipPatch { """References the entity (org or group) this membership belongs to""" entityId: UUID - profileId: UUID -} - -"""The output of our update `OrgInvite` mutation.""" -type UpdateOrgInvitePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `OrgInvite` that was updated by this mutation.""" - orgInvite: OrgInvite - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - """An edge for our `OrgInvite`. May be used by Relay 1.""" - orgInviteEdge( - """The method to use when ordering `OrgInvite`.""" - orderBy: [OrgInviteOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgInviteEdge -} - -"""All input for the `updateOrgInvite` mutation.""" -input UpdateOrgInviteInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `OrgInvite` being updated. - """ - orgInvitePatch: OrgInvitePatch! -} - -""" -Represents an update to a `OrgInvite`. Fields that are set will be updated. -""" -input OrgInvitePatch { - id: UUID - - """Email address of the invited recipient""" - email: ConstructiveInternalTypeEmail - - """User ID of the member who sent this invitation""" - senderId: UUID - - """User ID of the intended recipient, if targeting a specific user""" - receiverId: UUID - - """Unique random hex token used to redeem this invitation""" - inviteToken: String - - """Whether this invitation is still valid and can be redeemed""" - inviteValid: Boolean - - """Maximum number of times this invite can be claimed; -1 means unlimited""" - inviteLimit: Int - - """Running count of how many times this invite has been claimed""" - inviteCount: Int - - """Whether this invite can be claimed by multiple recipients""" - multiple: Boolean - - """Optional JSON payload of additional invite metadata""" - data: JSON - - """Timestamp after which this invitation can no longer be redeemed""" - expiresAt: Datetime - createdAt: Datetime - updatedAt: Datetime - entityId: UUID + """Whether this member has read-only access (blocks mutations when true)""" + isReadOnly: Boolean + profileId: UUID } """The output of our delete `OrgMember` mutation.""" @@ -7753,43 +8149,6 @@ input DeleteOrgOwnerGrantInput { id: UUID! } -"""The output of our delete `MembershipType` mutation.""" -type DeleteMembershipTypePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `MembershipType` that was deleted by this mutation.""" - membershipType: MembershipType - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `MembershipType`. May be used by Relay 1.""" - membershipTypeEdge( - """The method to use when ordering `MembershipType`.""" - orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] - ): MembershipTypeEdge -} - -"""All input for the `deleteMembershipType` mutation.""" -input DeleteMembershipTypeInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) - """ - id: Int! -} - """The output of our delete `AppPermission` mutation.""" type DeleteAppPermissionPayload { """ @@ -8054,6 +8413,43 @@ input DeleteOrgLimitInput { id: UUID! } +"""The output of our delete `MembershipType` mutation.""" +type DeleteMembershipTypePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `MembershipType` that was deleted by this mutation.""" + membershipType: MembershipType + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `MembershipType`. May be used by Relay 1.""" + membershipTypeEdge( + """The method to use when ordering `MembershipType`.""" + orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): MembershipTypeEdge +} + +"""All input for the `deleteMembershipType` mutation.""" +input DeleteMembershipTypeInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int! +} + """The output of our delete `AppGrant` mutation.""" type DeleteAppGrantPayload { """ @@ -8285,6 +8681,39 @@ input DeleteOrgMembershipDefaultInput { id: UUID! } +"""The output of our delete `OrgMemberProfile` mutation.""" +type DeleteOrgMemberProfilePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgMemberProfile` that was deleted by this mutation.""" + orgMemberProfile: OrgMemberProfile + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `OrgMemberProfile`. May be used by Relay 1.""" + orgMemberProfileEdge( + """The method to use when ordering `OrgMemberProfile`.""" + orderBy: [OrgMemberProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMemberProfileEdge +} + +"""All input for the `deleteOrgMemberProfile` mutation.""" +input DeleteOrgMemberProfileInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `AppLevel` mutation.""" type DeleteAppLevelPayload { """ @@ -8351,31 +8780,31 @@ input DeleteAppInviteInput { id: UUID! } -"""The output of our delete `AppMembership` mutation.""" -type DeleteAppMembershipPayload { +"""The output of our delete `OrgInvite` mutation.""" +type DeleteOrgInvitePayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `AppMembership` that was deleted by this mutation.""" - appMembership: AppMembership + """The `OrgInvite` that was deleted by this mutation.""" + orgInvite: OrgInvite """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `AppMembership`. May be used by Relay 1.""" - appMembershipEdge( - """The method to use when ordering `AppMembership`.""" - orderBy: [AppMembershipOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppMembershipEdge + """An edge for our `OrgInvite`. May be used by Relay 1.""" + orgInviteEdge( + """The method to use when ordering `OrgInvite`.""" + orderBy: [OrgInviteOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgInviteEdge } -"""All input for the `deleteAppMembership` mutation.""" -input DeleteAppMembershipInput { +"""All input for the `deleteOrgInvite` mutation.""" +input DeleteOrgInviteInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -8384,31 +8813,31 @@ input DeleteAppMembershipInput { id: UUID! } -"""The output of our delete `OrgMembership` mutation.""" -type DeleteOrgMembershipPayload { +"""The output of our delete `AppMembership` mutation.""" +type DeleteAppMembershipPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `OrgMembership` that was deleted by this mutation.""" - orgMembership: OrgMembership + """The `AppMembership` that was deleted by this mutation.""" + appMembership: AppMembership """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `OrgMembership`. May be used by Relay 1.""" - orgMembershipEdge( - """The method to use when ordering `OrgMembership`.""" - orderBy: [OrgMembershipOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgMembershipEdge + """An edge for our `AppMembership`. May be used by Relay 1.""" + appMembershipEdge( + """The method to use when ordering `AppMembership`.""" + orderBy: [AppMembershipOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppMembershipEdge } -"""All input for the `deleteOrgMembership` mutation.""" -input DeleteOrgMembershipInput { +"""All input for the `deleteAppMembership` mutation.""" +input DeleteAppMembershipInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -8417,31 +8846,31 @@ input DeleteOrgMembershipInput { id: UUID! } -"""The output of our delete `OrgInvite` mutation.""" -type DeleteOrgInvitePayload { +"""The output of our delete `OrgMembership` mutation.""" +type DeleteOrgMembershipPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `OrgInvite` that was deleted by this mutation.""" - orgInvite: OrgInvite + """The `OrgMembership` that was deleted by this mutation.""" + orgMembership: OrgMembership """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - """An edge for our `OrgInvite`. May be used by Relay 1.""" - orgInviteEdge( - """The method to use when ordering `OrgInvite`.""" - orderBy: [OrgInviteOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgInviteEdge + """An edge for our `OrgMembership`. May be used by Relay 1.""" + orgMembershipEdge( + """The method to use when ordering `OrgMembership`.""" + orderBy: [OrgMembershipOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipEdge } -"""All input for the `deleteOrgInvite` mutation.""" -input DeleteOrgInviteInput { +"""All input for the `deleteOrgMembership` mutation.""" +input DeleteOrgMembershipInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -8864,35 +9293,6 @@ type Query { orderBy: [OrgOwnerGrantOrderBy!] = [PRIMARY_KEY_ASC] ): OrgOwnerGrantConnection - """Reads and enables pagination through a set of `MembershipType`.""" - membershipTypes( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: MembershipTypeFilter - - """The method to use when ordering `MembershipType`.""" - orderBy: [MembershipTypeOrderBy!] = [PRIMARY_KEY_ASC] - ): MembershipTypeConnection - """Reads and enables pagination through a set of `AppPermission`.""" appPermissions( """Only read the first `n` values of the set.""" @@ -9125,6 +9525,35 @@ type Query { orderBy: [OrgLimitOrderBy!] = [PRIMARY_KEY_ASC] ): OrgLimitConnection + """Reads and enables pagination through a set of `MembershipType`.""" + membershipTypes( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: MembershipTypeFilter + + """The method to use when ordering `MembershipType`.""" + orderBy: [MembershipTypeOrderBy!] = [PRIMARY_KEY_ASC] + ): MembershipTypeConnection + """Reads and enables pagination through a set of `AppGrant`.""" appGrants( """Only read the first `n` values of the set.""" @@ -9328,6 +9757,35 @@ type Query { orderBy: [OrgMembershipDefaultOrderBy!] = [PRIMARY_KEY_ASC] ): OrgMembershipDefaultConnection + """Reads and enables pagination through a set of `OrgMemberProfile`.""" + orgMemberProfiles( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgMemberProfileFilter + + """The method to use when ordering `OrgMemberProfile`.""" + orderBy: [OrgMemberProfileOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgMemberProfileConnection + """Reads and enables pagination through a set of `AppLevel`.""" appLevels( """Only read the first `n` values of the set.""" @@ -9386,8 +9844,8 @@ type Query { orderBy: [AppInviteOrderBy!] = [PRIMARY_KEY_ASC] ): AppInviteConnection - """Reads and enables pagination through a set of `AppMembership`.""" - appMemberships( + """Reads and enables pagination through a set of `OrgInvite`.""" + orgInvites( """Only read the first `n` values of the set.""" first: Int @@ -9409,14 +9867,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: AppMembershipFilter + where: OrgInviteFilter - """The method to use when ordering `AppMembership`.""" - orderBy: [AppMembershipOrderBy!] = [PRIMARY_KEY_ASC] - ): AppMembershipConnection + """The method to use when ordering `OrgInvite`.""" + orderBy: [OrgInviteOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgInviteConnection - """Reads and enables pagination through a set of `OrgMembership`.""" - orgMemberships( + """Reads and enables pagination through a set of `AppMembership`.""" + appMemberships( """Only read the first `n` values of the set.""" first: Int @@ -9438,14 +9896,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgMembershipFilter + where: AppMembershipFilter - """The method to use when ordering `OrgMembership`.""" - orderBy: [OrgMembershipOrderBy!] = [PRIMARY_KEY_ASC] - ): OrgMembershipConnection + """The method to use when ordering `AppMembership`.""" + orderBy: [AppMembershipOrderBy!] = [PRIMARY_KEY_ASC] + ): AppMembershipConnection - """Reads and enables pagination through a set of `OrgInvite`.""" - orgInvites( + """Reads and enables pagination through a set of `OrgMembership`.""" + orgMemberships( """Only read the first `n` values of the set.""" first: Int @@ -9467,11 +9925,11 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgInviteFilter + where: OrgMembershipFilter - """The method to use when ordering `OrgInvite`.""" - orderBy: [OrgInviteOrderBy!] = [PRIMARY_KEY_ASC] - ): OrgInviteConnection + """The method to use when ordering `OrgMembership`.""" + orderBy: [OrgMembershipOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgMembershipConnection """ Metadata about the database schema, including tables, fields, indexes, and constraints. Useful for code generation tools. @@ -9568,14 +10026,6 @@ type Mutation { input: CreateOrgOwnerGrantInput! ): CreateOrgOwnerGrantPayload - """Creates a single `MembershipType`.""" - createMembershipType( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateMembershipTypeInput! - ): CreateMembershipTypePayload - """Creates a single `AppPermission`.""" createAppPermission( """ @@ -9640,6 +10090,14 @@ type Mutation { input: CreateOrgLimitInput! ): CreateOrgLimitPayload + """Creates a single `MembershipType`.""" + createMembershipType( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateMembershipTypeInput! + ): CreateMembershipTypePayload + """Creates a single `AppGrant`.""" createAppGrant( """ @@ -9696,6 +10154,14 @@ type Mutation { input: CreateOrgMembershipDefaultInput! ): CreateOrgMembershipDefaultPayload + """Creates a single `OrgMemberProfile`.""" + createOrgMemberProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgMemberProfileInput! + ): CreateOrgMemberProfilePayload + """Creates a single `AppLevel`.""" createAppLevel( """ @@ -9712,6 +10178,14 @@ type Mutation { input: CreateAppInviteInput! ): CreateAppInvitePayload + """Creates a single `OrgInvite`.""" + createOrgInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgInviteInput! + ): CreateOrgInvitePayload + """Creates a single `AppMembership`.""" createAppMembership( """ @@ -9728,14 +10202,6 @@ type Mutation { input: CreateOrgMembershipInput! ): CreateOrgMembershipPayload - """Creates a single `OrgInvite`.""" - createOrgInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgInviteInput! - ): CreateOrgInvitePayload - """Updates a single `OrgMember` using a unique key and a patch.""" updateOrgMember( """ @@ -9812,14 +10278,6 @@ type Mutation { input: UpdateOrgOwnerGrantInput! ): UpdateOrgOwnerGrantPayload - """Updates a single `MembershipType` using a unique key and a patch.""" - updateMembershipType( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateMembershipTypeInput! - ): UpdateMembershipTypePayload - """Updates a single `AppPermission` using a unique key and a patch.""" updateAppPermission( """ @@ -9884,6 +10342,14 @@ type Mutation { input: UpdateOrgLimitInput! ): UpdateOrgLimitPayload + """Updates a single `MembershipType` using a unique key and a patch.""" + updateMembershipType( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateMembershipTypeInput! + ): UpdateMembershipTypePayload + """Updates a single `AppGrant` using a unique key and a patch.""" updateAppGrant( """ @@ -9944,6 +10410,14 @@ type Mutation { input: UpdateOrgMembershipDefaultInput! ): UpdateOrgMembershipDefaultPayload + """Updates a single `OrgMemberProfile` using a unique key and a patch.""" + updateOrgMemberProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgMemberProfileInput! + ): UpdateOrgMemberProfilePayload + """Updates a single `AppLevel` using a unique key and a patch.""" updateAppLevel( """ @@ -9960,6 +10434,14 @@ type Mutation { input: UpdateAppInviteInput! ): UpdateAppInvitePayload + """Updates a single `OrgInvite` using a unique key and a patch.""" + updateOrgInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgInviteInput! + ): UpdateOrgInvitePayload + """Updates a single `AppMembership` using a unique key and a patch.""" updateAppMembership( """ @@ -9976,14 +10458,6 @@ type Mutation { input: UpdateOrgMembershipInput! ): UpdateOrgMembershipPayload - """Updates a single `OrgInvite` using a unique key and a patch.""" - updateOrgInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgInviteInput! - ): UpdateOrgInvitePayload - """Deletes a single `OrgMember` using a unique key.""" deleteOrgMember( """ @@ -10056,14 +10530,6 @@ type Mutation { input: DeleteOrgOwnerGrantInput! ): DeleteOrgOwnerGrantPayload - """Deletes a single `MembershipType` using a unique key.""" - deleteMembershipType( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteMembershipTypeInput! - ): DeleteMembershipTypePayload - """Deletes a single `AppPermission` using a unique key.""" deleteAppPermission( """ @@ -10128,6 +10594,14 @@ type Mutation { input: DeleteOrgLimitInput! ): DeleteOrgLimitPayload + """Deletes a single `MembershipType` using a unique key.""" + deleteMembershipType( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteMembershipTypeInput! + ): DeleteMembershipTypePayload + """Deletes a single `AppGrant` using a unique key.""" deleteAppGrant( """ @@ -10184,6 +10658,14 @@ type Mutation { input: DeleteOrgMembershipDefaultInput! ): DeleteOrgMembershipDefaultPayload + """Deletes a single `OrgMemberProfile` using a unique key.""" + deleteOrgMemberProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgMemberProfileInput! + ): DeleteOrgMemberProfilePayload + """Deletes a single `AppLevel` using a unique key.""" deleteAppLevel( """ @@ -10200,6 +10682,14 @@ type Mutation { input: DeleteAppInviteInput! ): DeleteAppInvitePayload + """Deletes a single `OrgInvite` using a unique key.""" + deleteOrgInvite( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgInviteInput! + ): DeleteOrgInvitePayload + """Deletes a single `AppMembership` using a unique key.""" deleteAppMembership( """ @@ -10216,14 +10706,6 @@ type Mutation { input: DeleteOrgMembershipInput! ): DeleteOrgMembershipPayload - """Deletes a single `OrgInvite` using a unique key.""" - deleteOrgInvite( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgInviteInput! - ): DeleteOrgInvitePayload - """ Request a presigned URL for uploading a file directly to S3. Client computes SHA-256 of the file content and provides it here. diff --git a/sdk/constructive-sdk/schemas/auth.graphql b/sdk/constructive-sdk/schemas/auth.graphql index 7626e712c..04062ab83 100644 --- a/sdk/constructive-sdk/schemas/auth.graphql +++ b/sdk/constructive-sdk/schemas/auth.graphql @@ -106,35 +106,6 @@ type User { orderBy: [CryptoAddressOrderBy!] = [PRIMARY_KEY_ASC] ): CryptoAddressConnection! - """Reads and enables pagination through a set of `ConnectedAccount`.""" - ownedConnectedAccounts( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: ConnectedAccountFilter - - """The method to use when ordering `ConnectedAccount`.""" - orderBy: [ConnectedAccountOrderBy!] = [PRIMARY_KEY_ASC] - ): ConnectedAccountConnection! - """Reads and enables pagination through a set of `AuditLog`.""" auditLogsByActorId( """Only read the first `n` values of the set.""" @@ -619,12 +590,6 @@ input UserFilter { """`ownedCryptoAddresses` exist.""" ownedCryptoAddressesExist: Boolean - """Filter by the object’s `ownedConnectedAccounts` relation.""" - ownedConnectedAccounts: UserToManyConnectedAccountFilter - - """`ownedConnectedAccounts` exist.""" - ownedConnectedAccountsExist: Boolean - """Filter by the object’s `auditLogsByActorId` relation.""" auditLogsByActorId: UserToManyAuditLogFilter @@ -1206,123 +1171,6 @@ input CryptoAddressFilter { owner: UserFilter } -""" -A filter to be used against many `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ -""" -input UserToManyConnectedAccountFilter { - """Filters to entities where at least one related entity matches.""" - some: ConnectedAccountFilter - - """Filters to entities where every related entity matches.""" - every: ConnectedAccountFilter - - """Filters to entities where no related entity matches.""" - none: ConnectedAccountFilter -} - -""" -A filter to be used against `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ -""" -input ConnectedAccountFilter { - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `ownerId` field.""" - ownerId: UUIDFilter - - """Filter by the object’s `service` field.""" - service: StringFilter - - """Filter by the object’s `identifier` field.""" - identifier: StringFilter - - """Filter by the object’s `details` field.""" - details: JSONFilter - - """Filter by the object’s `isVerified` field.""" - isVerified: BooleanFilter - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter - - """Checks for all expressions in this list.""" - and: [ConnectedAccountFilter!] - - """Checks for any expressions in this list.""" - or: [ConnectedAccountFilter!] - - """Negates the expression.""" - not: ConnectedAccountFilter - - """Filter by the object’s `owner` relation.""" - owner: UserFilter -} - -""" -A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ -""" -input JSONFilter { - """ - Is null (if `true` is specified) or is not null (if `false` is specified). - """ - isNull: Boolean - - """Equal to the specified value.""" - equalTo: JSON - - """Not equal to the specified value.""" - notEqualTo: JSON - - """ - Not equal to the specified value, treating null like an ordinary value. - """ - distinctFrom: JSON - - """Equal to the specified value, treating null like an ordinary value.""" - notDistinctFrom: JSON - - """Included in the specified list.""" - in: [JSON!] - - """Not included in the specified list.""" - notIn: [JSON!] - - """Less than the specified value.""" - lessThan: JSON - - """Less than or equal to the specified value.""" - lessThanOrEqualTo: JSON - - """Greater than the specified value.""" - greaterThan: JSON - - """Greater than or equal to the specified value.""" - greaterThanOrEqualTo: JSON - - """Contains the specified JSON.""" - contains: JSON - - """Contains the specified key.""" - containsKey: String - - """Contains all of the specified keys.""" - containsAllKeys: [String!] - - """Contains any of the specified keys.""" - containsAnyKeys: [String!] - - """Contained by the specified JSON.""" - containedBy: JSON -} - -""" -Represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). -""" -scalar JSON - """ A filter to be used against many `AuditLog` object types. All fields are combined with a logical ‘and.’ """ @@ -1738,82 +1586,6 @@ enum CryptoAddressOrderBy { UPDATED_AT_DESC } -"""A connection to a list of `ConnectedAccount` values.""" -type ConnectedAccountConnection { - """A list of `ConnectedAccount` objects.""" - nodes: [ConnectedAccount]! - - """ - A list of edges which contains the `ConnectedAccount` and cursor to aid in pagination. - """ - edges: [ConnectedAccountEdge]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """ - The count of *all* `ConnectedAccount` you could get from the connection. - """ - totalCount: Int! -} - -""" -OAuth and social login connections linking external service accounts to users -""" -type ConnectedAccount { - id: UUID! - ownerId: UUID! - - """The service used, e.g. `twitter` or `github`.""" - service: String! - - """A unique identifier for the user within the service""" - identifier: String! - - """Additional profile details extracted from this login method""" - details: JSON! - - """Whether this connected account has been verified""" - isVerified: Boolean! - createdAt: Datetime - updatedAt: Datetime - - """Reads a single `User` that is related to this `ConnectedAccount`.""" - owner: User -} - -"""A `ConnectedAccount` edge in the connection.""" -type ConnectedAccountEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `ConnectedAccount` at the end of the edge.""" - node: ConnectedAccount -} - -"""Methods to use when ordering `ConnectedAccount`.""" -enum ConnectedAccountOrderBy { - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - ID_ASC - ID_DESC - OWNER_ID_ASC - OWNER_ID_DESC - SERVICE_ASC - SERVICE_DESC - IDENTIFIER_ASC - IDENTIFIER_DESC - DETAILS_ASC - DETAILS_DESC - IS_VERIFIED_ASC - IS_VERIFIED_DESC - CREATED_AT_ASC - CREATED_AT_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC -} - """A connection to a list of `AuditLog` values.""" type AuditLogConnection { """A list of `AuditLog` objects.""" @@ -1929,8 +1701,168 @@ enum RoleTypeOrderBy { PRIMARY_KEY_DESC ID_ASC ID_DESC - NAME_ASC - NAME_DESC + NAME_ASC + NAME_DESC +} + +"""A connection to a list of `UserConnectedAccount` values.""" +type UserConnectedAccountConnection { + """A list of `UserConnectedAccount` objects.""" + nodes: [UserConnectedAccount]! + + """ + A list of edges which contains the `UserConnectedAccount` and cursor to aid in pagination. + """ + edges: [UserConnectedAccountEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `UserConnectedAccount` you could get from the connection. + """ + totalCount: Int! +} + +type UserConnectedAccount { + id: UUID + ownerId: UUID + service: String + identifier: String + details: JSON + isVerified: Boolean + createdAt: Datetime + updatedAt: Datetime +} + +""" +Represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). +""" +scalar JSON + +"""A `UserConnectedAccount` edge in the connection.""" +type UserConnectedAccountEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `UserConnectedAccount` at the end of the edge.""" + node: UserConnectedAccount +} + +""" +A filter to be used against `UserConnectedAccount` object types. All fields are combined with a logical ‘and.’ +""" +input UserConnectedAccountFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `ownerId` field.""" + ownerId: UUIDFilter + + """Filter by the object’s `service` field.""" + service: StringFilter + + """Filter by the object’s `identifier` field.""" + identifier: StringFilter + + """Filter by the object’s `details` field.""" + details: JSONFilter + + """Filter by the object’s `isVerified` field.""" + isVerified: BooleanFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Checks for all expressions in this list.""" + and: [UserConnectedAccountFilter!] + + """Checks for any expressions in this list.""" + or: [UserConnectedAccountFilter!] + + """Negates the expression.""" + not: UserConnectedAccountFilter +} + +""" +A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ +""" +input JSONFilter { + """ + Is null (if `true` is specified) or is not null (if `false` is specified). + """ + isNull: Boolean + + """Equal to the specified value.""" + equalTo: JSON + + """Not equal to the specified value.""" + notEqualTo: JSON + + """ + Not equal to the specified value, treating null like an ordinary value. + """ + distinctFrom: JSON + + """Equal to the specified value, treating null like an ordinary value.""" + notDistinctFrom: JSON + + """Included in the specified list.""" + in: [JSON!] + + """Not included in the specified list.""" + notIn: [JSON!] + + """Less than the specified value.""" + lessThan: JSON + + """Less than or equal to the specified value.""" + lessThanOrEqualTo: JSON + + """Greater than the specified value.""" + greaterThan: JSON + + """Greater than or equal to the specified value.""" + greaterThanOrEqualTo: JSON + + """Contains the specified JSON.""" + contains: JSON + + """Contains the specified key.""" + containsKey: String + + """Contains all of the specified keys.""" + containsAllKeys: [String!] + + """Contains any of the specified keys.""" + containsAnyKeys: [String!] + + """Contained by the specified JSON.""" + containedBy: JSON +} + +"""Methods to use when ordering `UserConnectedAccount`.""" +enum UserConnectedAccountOrderBy { + NATURAL + ID_ASC + ID_DESC + OWNER_ID_ASC + OWNER_ID_DESC + SERVICE_ASC + SERVICE_DESC + IDENTIFIER_ASC + IDENTIFIER_DESC + DETAILS_ASC + DETAILS_DESC + IS_VERIFIED_ASC + IS_VERIFIED_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """A connection to a list of `User` values.""" @@ -2209,6 +2141,81 @@ input CheckPasswordInput { password: String } +"""The output of our `disconnectAccount` mutation.""" +type DisconnectAccountPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: Boolean + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `disconnectAccount` mutation.""" +input DisconnectAccountInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + accountId: UUID! +} + +"""The output of our `revokeApiKey` mutation.""" +type RevokeApiKeyPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: Boolean + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `revokeApiKey` mutation.""" +input RevokeApiKeyInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + keyId: UUID! +} + +"""The output of our `revokeSession` mutation.""" +type RevokeSessionPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: Boolean + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `revokeSession` mutation.""" +input RevokeSessionInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + sessionId: UUID! +} + """The output of our `verifyPassword` mutation.""" type VerifyPasswordPayload { """ @@ -2337,6 +2344,32 @@ input VerifyEmailInput { token: String } +"""The output of our `provisionNewUser` mutation.""" +type ProvisionNewUserPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: UUID + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `provisionNewUser` mutation.""" +input ProvisionNewUserInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + email: String + password: String +} + """The output of our `resetPassword` mutation.""" type ResetPasswordPayload { """ @@ -2364,14 +2397,14 @@ input ResetPasswordInput { newPassword: String } -"""The output of our `signInOneTimeToken` mutation.""" -type SignInOneTimeTokenPayload { +"""The output of our `createApiKey` mutation.""" +type CreateApiKeyPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - result: SignInOneTimeTokenRecord + result: CreateApiKeyRecord """ Our root query field type. Allows us to run any query from our mutation payload. @@ -2379,34 +2412,31 @@ type SignInOneTimeTokenPayload { query: Query } -type SignInOneTimeTokenRecord { - id: UUID - userId: UUID - accessToken: String - accessTokenExpiresAt: Datetime - isVerified: Boolean - totpEnabled: Boolean +type CreateApiKeyRecord { + apiKey: String + keyId: UUID } -"""All input for the `signInOneTimeToken` mutation.""" -input SignInOneTimeTokenInput { +"""All input for the `createApiKey` mutation.""" +input CreateApiKeyInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - token: String - credentialKind: String + keyName: String! + accessLevel: String + mfaLevel: String } -"""The output of our `signIn` mutation.""" -type SignInPayload { +"""The output of our `signInCrossOrigin` mutation.""" +type SignInCrossOriginPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - result: SignInRecord + result: SignInCrossOriginRecord """ Our root query field type. Allows us to run any query from our mutation payload. @@ -2414,7 +2444,7 @@ type SignInPayload { query: Query } -type SignInRecord { +type SignInCrossOriginRecord { id: UUID userId: UUID accessToken: String @@ -2423,18 +2453,15 @@ type SignInRecord { totpEnabled: Boolean } -"""All input for the `signIn` mutation.""" -input SignInInput { +"""All input for the `signInCrossOrigin` mutation.""" +input SignInCrossOriginInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - email: String - password: String - rememberMe: Boolean + token: String credentialKind: String - csrfToken: String } """The output of our `signUp` mutation.""" @@ -2475,8 +2502,8 @@ input SignUpInput { csrfToken: String } -"""The output of our `oneTimeToken` mutation.""" -type OneTimeTokenPayload { +"""The output of our `requestCrossOriginToken` mutation.""" +type RequestCrossOriginTokenPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. @@ -2490,8 +2517,8 @@ type OneTimeTokenPayload { query: Query } -"""All input for the `oneTimeToken` mutation.""" -input OneTimeTokenInput { +"""All input for the `requestCrossOriginToken` mutation.""" +input RequestCrossOriginTokenInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -2503,6 +2530,47 @@ input OneTimeTokenInput { rememberMe: Boolean } +"""The output of our `signIn` mutation.""" +type SignInPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: SignInRecord + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +type SignInRecord { + id: UUID + userId: UUID + accessToken: String + accessTokenExpiresAt: Datetime + isVerified: Boolean + totpEnabled: Boolean + mfaRequired: Boolean + mfaChallengeToken: String +} + +"""All input for the `signIn` mutation.""" +input SignInInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + email: String + password: String + rememberMe: Boolean + credentialKind: String + csrfToken: String + deviceToken: String +} + """The output of our `extendTokenExpires` mutation.""" type ExtendTokenExpiresPayload { """ @@ -2760,56 +2828,42 @@ input PhoneNumberInput { updatedAt: Datetime } -"""The output of our create `ConnectedAccount` mutation.""" -type CreateConnectedAccountPayload { +"""The output of our create `UserConnectedAccount` mutation.""" +type CreateUserConnectedAccountPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `ConnectedAccount` that was created by this mutation.""" - connectedAccount: ConnectedAccount + """The `UserConnectedAccount` that was created by this mutation.""" + userConnectedAccount: UserConnectedAccount """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - - """An edge for our `ConnectedAccount`. May be used by Relay 1.""" - connectedAccountEdge( - """The method to use when ordering `ConnectedAccount`.""" - orderBy: [ConnectedAccountOrderBy!]! = [PRIMARY_KEY_ASC] - ): ConnectedAccountEdge } -"""All input for the create `ConnectedAccount` mutation.""" -input CreateConnectedAccountInput { +"""All input for the create `UserConnectedAccount` mutation.""" +input CreateUserConnectedAccountInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `ConnectedAccount` to be created by this mutation.""" - connectedAccount: ConnectedAccountInput! + """The `UserConnectedAccount` to be created by this mutation.""" + userConnectedAccount: UserConnectedAccountInput! } -"""An input for mutations affecting `ConnectedAccount`""" -input ConnectedAccountInput { +"""An input for mutations affecting `UserConnectedAccount`""" +input UserConnectedAccountInput { id: UUID ownerId: UUID - - """The service used, e.g. `twitter` or `github`.""" - service: String! - - """A unique identifier for the user within the service""" - identifier: String! - - """Additional profile details extracted from this login method""" - details: JSON! - - """Whether this connected account has been verified""" + service: String + identifier: String + details: JSON isVerified: Boolean createdAt: Datetime updatedAt: Datetime @@ -3141,66 +3195,6 @@ input PhoneNumberPatch { updatedAt: Datetime } -"""The output of our update `ConnectedAccount` mutation.""" -type UpdateConnectedAccountPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `ConnectedAccount` that was updated by this mutation.""" - connectedAccount: ConnectedAccount - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `ConnectedAccount`. May be used by Relay 1.""" - connectedAccountEdge( - """The method to use when ordering `ConnectedAccount`.""" - orderBy: [ConnectedAccountOrderBy!]! = [PRIMARY_KEY_ASC] - ): ConnectedAccountEdge -} - -"""All input for the `updateConnectedAccount` mutation.""" -input UpdateConnectedAccountInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `ConnectedAccount` being updated. - """ - connectedAccountPatch: ConnectedAccountPatch! -} - -""" -Represents an update to a `ConnectedAccount`. Fields that are set will be updated. -""" -input ConnectedAccountPatch { - id: UUID - ownerId: UUID - - """The service used, e.g. `twitter` or `github`.""" - service: String - - """A unique identifier for the user within the service""" - identifier: String - - """Additional profile details extracted from this login method""" - details: JSON - - """Whether this connected account has been verified""" - isVerified: Boolean - createdAt: Datetime - updatedAt: Datetime -} - """The output of our update `AuditLog` mutation.""" type UpdateAuditLogPayload { """ @@ -3480,39 +3474,6 @@ input DeletePhoneNumberInput { id: UUID! } -"""The output of our delete `ConnectedAccount` mutation.""" -type DeleteConnectedAccountPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `ConnectedAccount` that was deleted by this mutation.""" - connectedAccount: ConnectedAccount - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `ConnectedAccount`. May be used by Relay 1.""" - connectedAccountEdge( - """The method to use when ordering `ConnectedAccount`.""" - orderBy: [ConnectedAccountOrderBy!]! = [PRIMARY_KEY_ASC] - ): ConnectedAccountEdge -} - -"""All input for the `deleteConnectedAccount` mutation.""" -input DeleteConnectedAccountInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! -} - """The output of our delete `AuditLog` mutation.""" type DeleteAuditLogPayload { """ @@ -3664,9 +3625,10 @@ type ConfirmUploadPayload { """The root query type which gives access points into the data universe.""" type Query { - currentIpAddress: InternetAddress currentUserAgent: String + currentIpAddress: InternetAddress currentUserId: UUID + requireStepUp(stepUpType: String): Boolean currentUser: User """Reads and enables pagination through a set of `RoleType`.""" @@ -3756,8 +3718,8 @@ type Query { orderBy: [PhoneNumberOrderBy!] = [PRIMARY_KEY_ASC] ): PhoneNumberConnection - """Reads and enables pagination through a set of `ConnectedAccount`.""" - connectedAccounts( + """Reads and enables pagination through a set of `UserConnectedAccount`.""" + userConnectedAccounts( """Only read the first `n` values of the set.""" first: Int @@ -3779,11 +3741,11 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: ConnectedAccountFilter + where: UserConnectedAccountFilter - """The method to use when ordering `ConnectedAccount`.""" - orderBy: [ConnectedAccountOrderBy!] = [PRIMARY_KEY_ASC] - ): ConnectedAccountConnection + """The method to use when ordering `UserConnectedAccount`.""" + orderBy: [UserConnectedAccountOrderBy!] = [NATURAL] + ): UserConnectedAccountConnection """Reads and enables pagination through a set of `AuditLog`.""" auditLogs( @@ -3900,6 +3862,24 @@ type Mutation { """ input: CheckPasswordInput! ): CheckPasswordPayload + disconnectAccount( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DisconnectAccountInput! + ): DisconnectAccountPayload + revokeApiKey( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: RevokeApiKeyInput! + ): RevokeApiKeyPayload + revokeSession( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: RevokeSessionInput! + ): RevokeSessionPayload verifyPassword( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -3930,36 +3910,48 @@ type Mutation { """ input: VerifyEmailInput! ): VerifyEmailPayload + provisionNewUser( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: ProvisionNewUserInput! + ): ProvisionNewUserPayload resetPassword( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: ResetPasswordInput! ): ResetPasswordPayload - signInOneTimeToken( + createApiKey( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: SignInOneTimeTokenInput! - ): SignInOneTimeTokenPayload - signIn( + input: CreateApiKeyInput! + ): CreateApiKeyPayload + signInCrossOrigin( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: SignInInput! - ): SignInPayload + input: SignInCrossOriginInput! + ): SignInCrossOriginPayload signUp( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: SignUpInput! ): SignUpPayload - oneTimeToken( + requestCrossOriginToken( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: RequestCrossOriginTokenInput! + ): RequestCrossOriginTokenPayload + signIn( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: OneTimeTokenInput! - ): OneTimeTokenPayload + input: SignInInput! + ): SignInPayload extendTokenExpires( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -4003,13 +3995,13 @@ type Mutation { input: CreatePhoneNumberInput! ): CreatePhoneNumberPayload - """Creates a single `ConnectedAccount`.""" - createConnectedAccount( + """Creates a single `UserConnectedAccount`.""" + createUserConnectedAccount( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CreateConnectedAccountInput! - ): CreateConnectedAccountPayload + input: CreateUserConnectedAccountInput! + ): CreateUserConnectedAccountPayload """Creates a single `AuditLog`.""" createAuditLog( @@ -4059,14 +4051,6 @@ type Mutation { input: UpdatePhoneNumberInput! ): UpdatePhoneNumberPayload - """Updates a single `ConnectedAccount` using a unique key and a patch.""" - updateConnectedAccount( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateConnectedAccountInput! - ): UpdateConnectedAccountPayload - """Updates a single `AuditLog` using a unique key and a patch.""" updateAuditLog( """ @@ -4115,14 +4099,6 @@ type Mutation { input: DeletePhoneNumberInput! ): DeletePhoneNumberPayload - """Deletes a single `ConnectedAccount` using a unique key.""" - deleteConnectedAccount( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteConnectedAccountInput! - ): DeleteConnectedAccountPayload - """Deletes a single `AuditLog` using a unique key.""" deleteAuditLog( """ diff --git a/sdk/constructive-sdk/schemas/public.graphql b/sdk/constructive-sdk/schemas/public.graphql index dae3c91f2..2864af17f 100644 --- a/sdk/constructive-sdk/schemas/public.graphql +++ b/sdk/constructive-sdk/schemas/public.graphql @@ -835,6 +835,64 @@ type User { orderBy: [OrgOwnerGrantOrderBy!] = [PRIMARY_KEY_ASC] ): OrgOwnerGrantConnection! + """Reads and enables pagination through a set of `OrgMemberProfile`.""" + orgMemberProfilesByActorId( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgMemberProfileFilter + + """The method to use when ordering `OrgMemberProfile`.""" + orderBy: [OrgMemberProfileOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgMemberProfileConnection! + + """Reads and enables pagination through a set of `OrgMemberProfile`.""" + orgMemberProfilesByEntityId( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgMemberProfileFilter + + """The method to use when ordering `OrgMemberProfile`.""" + orderBy: [OrgMemberProfileOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgMemberProfileConnection! + """Reads and enables pagination through a set of `OrgGrant`.""" orgGrantsByActorId( """Only read the first `n` values of the set.""" @@ -1415,35 +1473,6 @@ type User { orderBy: [CryptoAddressOrderBy!] = [PRIMARY_KEY_ASC] ): CryptoAddressConnection! - """Reads and enables pagination through a set of `ConnectedAccount`.""" - ownedConnectedAccounts( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: ConnectedAccountFilter - - """The method to use when ordering `ConnectedAccount`.""" - orderBy: [ConnectedAccountOrderBy!] = [PRIMARY_KEY_ASC] - ): ConnectedAccountConnection! - """Reads and enables pagination through a set of `AppInvite`.""" appInvitesBySenderId( """Only read the first `n` values of the set.""" @@ -2370,6 +2399,35 @@ type Database { orderBy: [EmbeddingChunkOrderBy!] = [PRIMARY_KEY_ASC] ): EmbeddingChunkConnection! + """Reads and enables pagination through a set of `SpatialRelation`.""" + spatialRelations( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: SpatialRelationFilter + + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!] = [PRIMARY_KEY_ASC] + ): SpatialRelationConnection! + """Reads and enables pagination through a set of `DatabaseTransfer`.""" databaseTransfers( """Only read the first `n` values of the set.""" @@ -3223,35 +3281,6 @@ type Database { """Reads a single `HierarchyModule` that is related to this `Database`.""" hierarchyModule: HierarchyModule - """Reads and enables pagination through a set of `TableTemplateModule`.""" - tableTemplateModules( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: TableTemplateModuleFilter - - """The method to use when ordering `TableTemplateModule`.""" - orderBy: [TableTemplateModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): TableTemplateModuleConnection! - """Reads and enables pagination through a set of `SecureTableProvision`.""" secureTableProvisions( """Only read the first `n` values of the set.""" @@ -3397,9 +3426,101 @@ type Database { orderBy: [StorageModuleOrderBy!] = [PRIMARY_KEY_ASC] ): StorageModuleConnection! + """Reads and enables pagination through a set of `EntityTypeProvision`.""" + entityTypeProvisions( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: EntityTypeProvisionFilter + + """The method to use when ordering `EntityTypeProvision`.""" + orderBy: [EntityTypeProvisionOrderBy!] = [PRIMARY_KEY_ASC] + ): EntityTypeProvisionConnection! + """Reads a single `RateLimitsModule` that is related to this `Database`.""" rateLimitsModule: RateLimitsModule + """Reads a single `DevicesModule` that is related to this `Database`.""" + devicesModule: DevicesModule + + """Reads and enables pagination through a set of `SessionSecretsModule`.""" + sessionSecretsModules( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: SessionSecretsModuleFilter + + """The method to use when ordering `SessionSecretsModule`.""" + orderBy: [SessionSecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): SessionSecretsModuleConnection! + + """ + Reads and enables pagination through a set of `WebauthnCredentialsModule`. + """ + webauthnCredentialsModules( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: WebauthnCredentialsModuleFilter + + """The method to use when ordering `WebauthnCredentialsModule`.""" + orderBy: [WebauthnCredentialsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): WebauthnCredentialsModuleConnection! + """ Reads and enables pagination through a set of `DatabaseProvisionModule`. """ @@ -3642,8 +3763,8 @@ type Schema { orderBy: [ApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] ): ApiSchemaConnection! - """Reads and enables pagination through a set of `TableTemplateModule`.""" - tableTemplateModulesByPrivateSchemaId( + """Reads and enables pagination through a set of `SessionSecretsModule`.""" + sessionSecretsModules( """Only read the first `n` values of the set.""" first: Int @@ -3665,40 +3786,11 @@ type Schema { """ A filter to be used in determining which values should be returned by the collection. """ - where: TableTemplateModuleFilter - - """The method to use when ordering `TableTemplateModule`.""" - orderBy: [TableTemplateModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): TableTemplateModuleConnection! - - """Reads and enables pagination through a set of `TableTemplateModule`.""" - tableTemplateModules( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int + where: SessionSecretsModuleFilter - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: TableTemplateModuleFilter - - """The method to use when ordering `TableTemplateModule`.""" - orderBy: [TableTemplateModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): TableTemplateModuleConnection! + """The method to use when ordering `SessionSecretsModule`.""" + orderBy: [SessionSecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): SessionSecretsModuleConnection! } enum ObjectCategory { @@ -4160,8 +4252,8 @@ type Table { orderBy: [EmbeddingChunkOrderBy!] = [PRIMARY_KEY_ASC] ): EmbeddingChunkConnection! - """Reads and enables pagination through a set of `TableTemplateModule`.""" - tableTemplateModulesByOwnerTableId( + """Reads and enables pagination through a set of `SpatialRelation`.""" + spatialRelationsByRefTableId( """Only read the first `n` values of the set.""" first: Int @@ -4183,14 +4275,14 @@ type Table { """ A filter to be used in determining which values should be returned by the collection. """ - where: TableTemplateModuleFilter + where: SpatialRelationFilter - """The method to use when ordering `TableTemplateModule`.""" - orderBy: [TableTemplateModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): TableTemplateModuleConnection! + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!] = [PRIMARY_KEY_ASC] + ): SpatialRelationConnection! - """Reads and enables pagination through a set of `TableTemplateModule`.""" - tableTemplateModules( + """Reads and enables pagination through a set of `SpatialRelation`.""" + spatialRelations( """Only read the first `n` values of the set.""" first: Int @@ -4212,11 +4304,11 @@ type Table { """ A filter to be used in determining which values should be returned by the collection. """ - where: TableTemplateModuleFilter + where: SpatialRelationFilter - """The method to use when ordering `TableTemplateModule`.""" - orderBy: [TableTemplateModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): TableTemplateModuleConnection! + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!] = [PRIMARY_KEY_ASC] + ): SpatialRelationConnection! """Reads and enables pagination through a set of `SecureTableProvision`.""" secureTableProvisions( @@ -4304,6 +4396,64 @@ type Table { """The method to use when ordering `RelationProvision`.""" orderBy: [RelationProvisionOrderBy!] = [PRIMARY_KEY_ASC] ): RelationProvisionConnection! + + """Reads and enables pagination through a set of `SessionSecretsModule`.""" + sessionSecretsModulesBySessionsTableId( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: SessionSecretsModuleFilter + + """The method to use when ordering `SessionSecretsModule`.""" + orderBy: [SessionSecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): SessionSecretsModuleConnection! + + """Reads and enables pagination through a set of `SessionSecretsModule`.""" + sessionSecretsModules( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: SessionSecretsModuleFilter + + """The method to use when ordering `SessionSecretsModule`.""" + orderBy: [SessionSecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): SessionSecretsModuleConnection! } """A connection to a list of `CheckConstraint` values.""" @@ -5065,6 +5215,12 @@ input DatabaseFilter { """`embeddingChunks` exist.""" embeddingChunksExist: Boolean + """Filter by the object’s `spatialRelations` relation.""" + spatialRelations: DatabaseToManySpatialRelationFilter + + """`spatialRelations` exist.""" + spatialRelationsExist: Boolean + """Filter by the object’s `databaseTransfers` relation.""" databaseTransfers: DatabaseToManyDatabaseTransferFilter @@ -5251,12 +5407,6 @@ input DatabaseFilter { """A related `hierarchyModule` exists.""" hierarchyModuleExists: Boolean - """Filter by the object’s `tableTemplateModules` relation.""" - tableTemplateModules: DatabaseToManyTableTemplateModuleFilter - - """`tableTemplateModules` exist.""" - tableTemplateModulesExist: Boolean - """Filter by the object’s `secureTableProvisions` relation.""" secureTableProvisions: DatabaseToManySecureTableProvisionFilter @@ -5287,12 +5437,36 @@ input DatabaseFilter { """`storageModules` exist.""" storageModulesExist: Boolean + """Filter by the object’s `entityTypeProvisions` relation.""" + entityTypeProvisions: DatabaseToManyEntityTypeProvisionFilter + + """`entityTypeProvisions` exist.""" + entityTypeProvisionsExist: Boolean + """Filter by the object’s `rateLimitsModule` relation.""" rateLimitsModule: RateLimitsModuleFilter """A related `rateLimitsModule` exists.""" rateLimitsModuleExists: Boolean + """Filter by the object’s `devicesModule` relation.""" + devicesModule: DevicesModuleFilter + + """A related `devicesModule` exists.""" + devicesModuleExists: Boolean + + """Filter by the object’s `sessionSecretsModules` relation.""" + sessionSecretsModules: DatabaseToManySessionSecretsModuleFilter + + """`sessionSecretsModules` exist.""" + sessionSecretsModulesExist: Boolean + + """Filter by the object’s `webauthnCredentialsModules` relation.""" + webauthnCredentialsModules: DatabaseToManyWebauthnCredentialsModuleFilter + + """`webauthnCredentialsModules` exist.""" + webauthnCredentialsModulesExist: Boolean + """Filter by the object’s `databaseProvisionModules` relation.""" databaseProvisionModules: DatabaseToManyDatabaseProvisionModuleFilter @@ -5454,6 +5628,18 @@ input UserFilter { """`orgOwnerGrantsByGrantorId` exist.""" orgOwnerGrantsByGrantorIdExist: Boolean + """Filter by the object’s `orgMemberProfilesByActorId` relation.""" + orgMemberProfilesByActorId: UserToManyOrgMemberProfileFilter + + """`orgMemberProfilesByActorId` exist.""" + orgMemberProfilesByActorIdExist: Boolean + + """Filter by the object’s `orgMemberProfilesByEntityId` relation.""" + orgMemberProfilesByEntityId: UserToManyOrgMemberProfileFilter + + """`orgMemberProfilesByEntityId` exist.""" + orgMemberProfilesByEntityIdExist: Boolean + """Filter by the object’s `orgGrantsByActorId` relation.""" orgGrantsByActorId: UserToManyOrgGrantFilter @@ -5574,12 +5760,6 @@ input UserFilter { """`ownedCryptoAddresses` exist.""" ownedCryptoAddressesExist: Boolean - """Filter by the object’s `ownedConnectedAccounts` relation.""" - ownedConnectedAccounts: UserToManyConnectedAccountFilter - - """`ownedConnectedAccounts` exist.""" - ownedConnectedAccountsExist: Boolean - """Filter by the object’s `appInvitesBySenderId` relation.""" appInvitesBySenderId: UserToManyAppInviteFilter @@ -5968,6 +6148,9 @@ input AppMembershipFilter { """Filter by the object’s `isActive` field.""" isActive: BooleanFilter + """Filter by the object’s `isExternal` field.""" + isExternal: BooleanFilter + """Filter by the object’s `isOwner` field.""" isOwner: BooleanFilter @@ -6296,6 +6479,9 @@ input OrgMembershipFilter { """Filter by the object’s `isActive` field.""" isActive: BooleanFilter + """Filter by the object’s `isExternal` field.""" + isExternal: BooleanFilter + """Filter by the object’s `isOwner` field.""" isOwner: BooleanFilter @@ -6314,6 +6500,9 @@ input OrgMembershipFilter { """Filter by the object’s `entityId` field.""" entityId: UUIDFilter + """Filter by the object’s `isReadOnly` field.""" + isReadOnly: BooleanFilter + """Filter by the object’s `profileId` field.""" profileId: UUIDFilter @@ -6331,6 +6520,68 @@ input OrgMembershipFilter { """Filter by the object’s `entity` relation.""" entity: UserFilter + + """Filter by the object’s `orgMemberProfileByMembershipId` relation.""" + orgMemberProfileByMembershipId: OrgMemberProfileFilter + + """A related `orgMemberProfileByMembershipId` exists.""" + orgMemberProfileByMembershipIdExists: Boolean +} + +""" +A filter to be used against `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ +""" +input OrgMemberProfileFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Filter by the object’s `membershipId` field.""" + membershipId: UUIDFilter + + """Filter by the object’s `entityId` field.""" + entityId: UUIDFilter + + """Filter by the object’s `actorId` field.""" + actorId: UUIDFilter + + """Filter by the object’s `displayName` field.""" + displayName: StringFilter + + """Filter by the object’s `email` field.""" + email: StringFilter + + """Filter by the object’s `title` field.""" + title: StringFilter + + """Filter by the object’s `bio` field.""" + bio: StringFilter + + """Filter by the object’s `profilePicture` field.""" + profilePicture: ConstructiveInternalTypeImageFilter + + """Checks for all expressions in this list.""" + and: [OrgMemberProfileFilter!] + + """Checks for any expressions in this list.""" + or: [OrgMemberProfileFilter!] + + """Negates the expression.""" + not: OrgMemberProfileFilter + + """Filter by the object’s `actor` relation.""" + actor: UserFilter + + """Filter by the object’s `entity` relation.""" + entity: UserFilter + + """Filter by the object’s `membership` relation.""" + membership: OrgMembershipFilter } """ @@ -6545,6 +6796,20 @@ input OrgOwnerGrantFilter { grantorExists: Boolean } +""" +A filter to be used against many `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ +""" +input UserToManyOrgMemberProfileFilter { + """Filters to entities where at least one related entity matches.""" + some: OrgMemberProfileFilter + + """Filters to entities where every related entity matches.""" + every: OrgMemberProfileFilter + + """Filters to entities where no related entity matches.""" + none: OrgMemberProfileFilter +} + """ A filter to be used against many `OrgGrant` object types. All fields are combined with a logical ‘and.’ """ @@ -7330,61 +7595,6 @@ input CryptoAddressFilter { owner: UserFilter } -""" -A filter to be used against many `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ -""" -input UserToManyConnectedAccountFilter { - """Filters to entities where at least one related entity matches.""" - some: ConnectedAccountFilter - - """Filters to entities where every related entity matches.""" - every: ConnectedAccountFilter - - """Filters to entities where no related entity matches.""" - none: ConnectedAccountFilter -} - -""" -A filter to be used against `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ -""" -input ConnectedAccountFilter { - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `ownerId` field.""" - ownerId: UUIDFilter - - """Filter by the object’s `service` field.""" - service: StringFilter - - """Filter by the object’s `identifier` field.""" - identifier: StringFilter - - """Filter by the object’s `details` field.""" - details: JSONFilter - - """Filter by the object’s `isVerified` field.""" - isVerified: BooleanFilter - - """Filter by the object’s `createdAt` field.""" - createdAt: DatetimeFilter - - """Filter by the object’s `updatedAt` field.""" - updatedAt: DatetimeFilter - - """Checks for all expressions in this list.""" - and: [ConnectedAccountFilter!] - - """Checks for any expressions in this list.""" - or: [ConnectedAccountFilter!] - - """Negates the expression.""" - not: ConnectedAccountFilter - - """Filter by the object’s `owner` relation.""" - owner: UserFilter -} - """ A filter to be used against many `AppInvite` object types. All fields are combined with a logical ‘and.’ """ @@ -8001,19 +8211,11 @@ input SchemaFilter { """`apiSchemas` exist.""" apiSchemasExist: Boolean - """ - Filter by the object’s `tableTemplateModulesByPrivateSchemaId` relation. - """ - tableTemplateModulesByPrivateSchemaId: SchemaToManyTableTemplateModuleFilter - - """`tableTemplateModulesByPrivateSchemaId` exist.""" - tableTemplateModulesByPrivateSchemaIdExist: Boolean - - """Filter by the object’s `tableTemplateModules` relation.""" - tableTemplateModules: SchemaToManyTableTemplateModuleFilter + """Filter by the object’s `sessionSecretsModules` relation.""" + sessionSecretsModules: SchemaToManySessionSecretsModuleFilter - """`tableTemplateModules` exist.""" - tableTemplateModulesExist: Boolean + """`sessionSecretsModules` exist.""" + sessionSecretsModulesExist: Boolean } """ @@ -8196,17 +8398,17 @@ input TableFilter { """`embeddingChunks` exist.""" embeddingChunksExist: Boolean - """Filter by the object’s `tableTemplateModulesByOwnerTableId` relation.""" - tableTemplateModulesByOwnerTableId: TableToManyTableTemplateModuleFilter + """Filter by the object’s `spatialRelationsByRefTableId` relation.""" + spatialRelationsByRefTableId: TableToManySpatialRelationFilter - """`tableTemplateModulesByOwnerTableId` exist.""" - tableTemplateModulesByOwnerTableIdExist: Boolean + """`spatialRelationsByRefTableId` exist.""" + spatialRelationsByRefTableIdExist: Boolean - """Filter by the object’s `tableTemplateModules` relation.""" - tableTemplateModules: TableToManyTableTemplateModuleFilter + """Filter by the object’s `spatialRelations` relation.""" + spatialRelations: TableToManySpatialRelationFilter - """`tableTemplateModules` exist.""" - tableTemplateModulesExist: Boolean + """`spatialRelations` exist.""" + spatialRelationsExist: Boolean """Filter by the object’s `secureTableProvisions` relation.""" secureTableProvisions: TableToManySecureTableProvisionFilter @@ -8225,6 +8427,20 @@ input TableFilter { """`relationProvisionsByTargetTableId` exist.""" relationProvisionsByTargetTableIdExist: Boolean + + """ + Filter by the object’s `sessionSecretsModulesBySessionsTableId` relation. + """ + sessionSecretsModulesBySessionsTableId: TableToManySessionSecretsModuleFilter + + """`sessionSecretsModulesBySessionsTableId` exist.""" + sessionSecretsModulesBySessionsTableIdExist: Boolean + + """Filter by the object’s `sessionSecretsModules` relation.""" + sessionSecretsModules: TableToManySessionSecretsModuleFilter + + """`sessionSecretsModules` exist.""" + sessionSecretsModulesExist: Boolean } """ @@ -8345,6 +8561,18 @@ input FieldFilter { """Filter by the object’s `table` relation.""" table: TableFilter + + """Filter by the object’s `spatialRelations` relation.""" + spatialRelations: FieldToManySpatialRelationFilter + + """`spatialRelations` exist.""" + spatialRelationsExist: Boolean + + """Filter by the object’s `spatialRelationsByRefFieldId` relation.""" + spatialRelationsByRefFieldId: FieldToManySpatialRelationFilter + + """`spatialRelationsByRefFieldId` exist.""" + spatialRelationsByRefFieldIdExist: Boolean } """ @@ -8389,6 +8617,94 @@ input FloatFilter { greaterThanOrEqualTo: Float } +""" +A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ +""" +input FieldToManySpatialRelationFilter { + """Filters to entities where at least one related entity matches.""" + some: SpatialRelationFilter + + """Filters to entities where every related entity matches.""" + every: SpatialRelationFilter + + """Filters to entities where no related entity matches.""" + none: SpatialRelationFilter +} + +""" +A filter to be used against `SpatialRelation` object types. All fields are combined with a logical ‘and.’ +""" +input SpatialRelationFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `tableId` field.""" + tableId: UUIDFilter + + """Filter by the object’s `fieldId` field.""" + fieldId: UUIDFilter + + """Filter by the object’s `refTableId` field.""" + refTableId: UUIDFilter + + """Filter by the object’s `refFieldId` field.""" + refFieldId: UUIDFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Filter by the object’s `operator` field.""" + operator: StringFilter + + """Filter by the object’s `paramName` field.""" + paramName: StringFilter + + """Filter by the object’s `category` field.""" + category: ObjectCategoryFilter + + """Filter by the object’s `module` field.""" + module: StringFilter + + """Filter by the object’s `scope` field.""" + scope: IntFilter + + """Filter by the object’s `tags` field.""" + tags: StringListFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter + + """Checks for all expressions in this list.""" + and: [SpatialRelationFilter!] + + """Checks for any expressions in this list.""" + or: [SpatialRelationFilter!] + + """Negates the expression.""" + not: SpatialRelationFilter + + """Filter by the object’s `database` relation.""" + database: DatabaseFilter + + """Filter by the object’s `field` relation.""" + field: FieldFilter + + """Filter by the object’s `refField` relation.""" + refField: FieldFilter + + """Filter by the object’s `refTable` relation.""" + refTable: TableFilter + + """Filter by the object’s `table` relation.""" + table: TableFilter +} + """ A filter to be used against many `ForeignKeyConstraint` object types. All fields are combined with a logical ‘and.’ """ @@ -9380,73 +9696,17 @@ input EmbeddingChunkFilter { } """ -A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ +A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ """ -input TableToManyTableTemplateModuleFilter { +input TableToManySpatialRelationFilter { """Filters to entities where at least one related entity matches.""" - some: TableTemplateModuleFilter + some: SpatialRelationFilter """Filters to entities where every related entity matches.""" - every: TableTemplateModuleFilter + every: SpatialRelationFilter """Filters to entities where no related entity matches.""" - none: TableTemplateModuleFilter -} - -""" -A filter to be used against `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ -""" -input TableTemplateModuleFilter { - """Filter by the object’s `id` field.""" - id: UUIDFilter - - """Filter by the object’s `databaseId` field.""" - databaseId: UUIDFilter - - """Filter by the object’s `schemaId` field.""" - schemaId: UUIDFilter - - """Filter by the object’s `privateSchemaId` field.""" - privateSchemaId: UUIDFilter - - """Filter by the object’s `tableId` field.""" - tableId: UUIDFilter - - """Filter by the object’s `ownerTableId` field.""" - ownerTableId: UUIDFilter - - """Filter by the object’s `tableName` field.""" - tableName: StringFilter - - """Filter by the object’s `nodeType` field.""" - nodeType: StringFilter - - """Filter by the object’s `data` field.""" - data: JSONFilter - - """Checks for all expressions in this list.""" - and: [TableTemplateModuleFilter!] - - """Checks for any expressions in this list.""" - or: [TableTemplateModuleFilter!] - - """Negates the expression.""" - not: TableTemplateModuleFilter - - """Filter by the object’s `database` relation.""" - database: DatabaseFilter - - """Filter by the object’s `ownerTable` relation.""" - ownerTable: TableFilter - - """Filter by the object’s `privateSchema` relation.""" - privateSchema: SchemaFilter - - """Filter by the object’s `schema` relation.""" - schema: SchemaFilter - - """Filter by the object’s `table` relation.""" - table: TableFilter + none: SpatialRelationFilter } """ @@ -9727,6 +9987,64 @@ input RelationProvisionFilter { targetTable: TableFilter } +""" +A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ +""" +input TableToManySessionSecretsModuleFilter { + """Filters to entities where at least one related entity matches.""" + some: SessionSecretsModuleFilter + + """Filters to entities where every related entity matches.""" + every: SessionSecretsModuleFilter + + """Filters to entities where no related entity matches.""" + none: SessionSecretsModuleFilter +} + +""" +A filter to be used against `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ +""" +input SessionSecretsModuleFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter + + """Filter by the object’s `tableId` field.""" + tableId: UUIDFilter + + """Filter by the object’s `tableName` field.""" + tableName: StringFilter + + """Filter by the object’s `sessionsTableId` field.""" + sessionsTableId: UUIDFilter + + """Checks for all expressions in this list.""" + and: [SessionSecretsModuleFilter!] + + """Checks for any expressions in this list.""" + or: [SessionSecretsModuleFilter!] + + """Negates the expression.""" + not: SessionSecretsModuleFilter + + """Filter by the object’s `database` relation.""" + database: DatabaseFilter + + """Filter by the object’s `schema` relation.""" + schema: SchemaFilter + + """Filter by the object’s `sessionsTable` relation.""" + sessionsTable: TableFilter + + """Filter by the object’s `table` relation.""" + table: TableFilter +} + """ A filter to be used against many `SchemaGrant` object types. All fields are combined with a logical ‘and.’ """ @@ -10826,17 +11144,17 @@ input SiteThemeFilter { } """ -A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ +A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ """ -input SchemaToManyTableTemplateModuleFilter { +input SchemaToManySessionSecretsModuleFilter { """Filters to entities where at least one related entity matches.""" - some: TableTemplateModuleFilter + some: SessionSecretsModuleFilter """Filters to entities where every related entity matches.""" - every: TableTemplateModuleFilter + every: SessionSecretsModuleFilter """Filters to entities where no related entity matches.""" - none: TableTemplateModuleFilter + none: SessionSecretsModuleFilter } """ @@ -11140,6 +11458,20 @@ input DatabaseToManyEmbeddingChunkFilter { none: EmbeddingChunkFilter } +""" +A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ +""" +input DatabaseToManySpatialRelationFilter { + """Filters to entities where at least one related entity matches.""" + some: SpatialRelationFilter + + """Filters to entities where every related entity matches.""" + every: SpatialRelationFilter + + """Filters to entities where no related entity matches.""" + none: SpatialRelationFilter +} + """ A filter to be used against many `DatabaseTransfer` object types. All fields are combined with a logical ‘and.’ """ @@ -12292,6 +12624,9 @@ input MembershipsModuleFilter { """Filter by the object’s `entityIdsFunction` field.""" entityIdsFunction: StringFilter + """Filter by the object’s `memberProfilesTableId` field.""" + memberProfilesTableId: UUIDFilter + """Checks for all expressions in this list.""" and: [MembershipsModuleFilter!] @@ -12994,11 +13329,11 @@ input UserAuthModuleFilter { """Filter by the object’s `deleteAccountFunction` field.""" deleteAccountFunction: StringFilter - """Filter by the object’s `signInOneTimeTokenFunction` field.""" - signInOneTimeTokenFunction: StringFilter + """Filter by the object’s `signInCrossOriginFunction` field.""" + signInCrossOriginFunction: StringFilter - """Filter by the object’s `oneTimeTokenFunction` field.""" - oneTimeTokenFunction: StringFilter + """Filter by the object’s `requestCrossOriginTokenFunction` field.""" + requestCrossOriginTokenFunction: StringFilter """Filter by the object’s `extendTokenExpires` field.""" extendTokenExpires: StringFilter @@ -13196,20 +13531,6 @@ input HierarchyModuleFilter { usersTable: TableFilter } -""" -A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ -""" -input DatabaseToManyTableTemplateModuleFilter { - """Filters to entities where at least one related entity matches.""" - some: TableTemplateModuleFilter - - """Filters to entities where every related entity matches.""" - every: TableTemplateModuleFilter - - """Filters to entities where no related entity matches.""" - none: TableTemplateModuleFilter -} - """ A filter to be used against many `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ """ @@ -13679,6 +14000,88 @@ strings and not numbers. """ scalar BigInt +""" +A filter to be used against many `EntityTypeProvision` object types. All fields are combined with a logical ‘and.’ +""" +input DatabaseToManyEntityTypeProvisionFilter { + """Filters to entities where at least one related entity matches.""" + some: EntityTypeProvisionFilter + + """Filters to entities where every related entity matches.""" + every: EntityTypeProvisionFilter + + """Filters to entities where no related entity matches.""" + none: EntityTypeProvisionFilter +} + +""" +A filter to be used against `EntityTypeProvision` object types. All fields are combined with a logical ‘and.’ +""" +input EntityTypeProvisionFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Filter by the object’s `prefix` field.""" + prefix: StringFilter + + """Filter by the object’s `description` field.""" + description: StringFilter + + """Filter by the object’s `parentEntity` field.""" + parentEntity: StringFilter + + """Filter by the object’s `tableName` field.""" + tableName: StringFilter + + """Filter by the object’s `isVisible` field.""" + isVisible: BooleanFilter + + """Filter by the object’s `hasLimits` field.""" + hasLimits: BooleanFilter + + """Filter by the object’s `hasProfiles` field.""" + hasProfiles: BooleanFilter + + """Filter by the object’s `hasLevels` field.""" + hasLevels: BooleanFilter + + """Filter by the object’s `skipEntityPolicies` field.""" + skipEntityPolicies: BooleanFilter + + """Filter by the object’s `tableProvision` field.""" + tableProvision: JSONFilter + + """Filter by the object’s `outMembershipType` field.""" + outMembershipType: IntFilter + + """Filter by the object’s `outEntityTableId` field.""" + outEntityTableId: UUIDFilter + + """Filter by the object’s `outEntityTableName` field.""" + outEntityTableName: StringFilter + + """Filter by the object’s `outInstalledModules` field.""" + outInstalledModules: StringListFilter + + """Checks for all expressions in this list.""" + and: [EntityTypeProvisionFilter!] + + """Checks for any expressions in this list.""" + or: [EntityTypeProvisionFilter!] + + """Negates the expression.""" + not: EntityTypeProvisionFilter + + """Filter by the object’s `database` relation.""" + database: DatabaseFilter +} + """ A filter to be used against `RateLimitsModule` object types. All fields are combined with a logical ‘and.’ """ @@ -13739,6 +14142,135 @@ input RateLimitsModuleFilter { schema: SchemaFilter } +""" +A filter to be used against `DevicesModule` object types. All fields are combined with a logical ‘and.’ +""" +input DevicesModuleFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter + + """Filter by the object’s `userDevicesTableId` field.""" + userDevicesTableId: UUIDFilter + + """Filter by the object’s `deviceSettingsTableId` field.""" + deviceSettingsTableId: UUIDFilter + + """Filter by the object’s `userDevicesTable` field.""" + userDevicesTable: StringFilter + + """Filter by the object’s `deviceSettingsTable` field.""" + deviceSettingsTable: StringFilter + + """Checks for all expressions in this list.""" + and: [DevicesModuleFilter!] + + """Checks for any expressions in this list.""" + or: [DevicesModuleFilter!] + + """Negates the expression.""" + not: DevicesModuleFilter + + """Filter by the object’s `database` relation.""" + database: DatabaseFilter + + """ + Filter by the object’s `deviceSettingsTableByDeviceSettingsTableId` relation. + """ + deviceSettingsTableByDeviceSettingsTableId: TableFilter + + """Filter by the object’s `schema` relation.""" + schema: SchemaFilter + + """ + Filter by the object’s `userDevicesTableByUserDevicesTableId` relation. + """ + userDevicesTableByUserDevicesTableId: TableFilter +} + +""" +A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ +""" +input DatabaseToManySessionSecretsModuleFilter { + """Filters to entities where at least one related entity matches.""" + some: SessionSecretsModuleFilter + + """Filters to entities where every related entity matches.""" + every: SessionSecretsModuleFilter + + """Filters to entities where no related entity matches.""" + none: SessionSecretsModuleFilter +} + +""" +A filter to be used against many `WebauthnCredentialsModule` object types. All fields are combined with a logical ‘and.’ +""" +input DatabaseToManyWebauthnCredentialsModuleFilter { + """Filters to entities where at least one related entity matches.""" + some: WebauthnCredentialsModuleFilter + + """Filters to entities where every related entity matches.""" + every: WebauthnCredentialsModuleFilter + + """Filters to entities where no related entity matches.""" + none: WebauthnCredentialsModuleFilter +} + +""" +A filter to be used against `WebauthnCredentialsModule` object types. All fields are combined with a logical ‘and.’ +""" +input WebauthnCredentialsModuleFilter { + """Filter by the object’s `id` field.""" + id: UUIDFilter + + """Filter by the object’s `databaseId` field.""" + databaseId: UUIDFilter + + """Filter by the object’s `schemaId` field.""" + schemaId: UUIDFilter + + """Filter by the object’s `privateSchemaId` field.""" + privateSchemaId: UUIDFilter + + """Filter by the object’s `tableId` field.""" + tableId: UUIDFilter + + """Filter by the object’s `ownerTableId` field.""" + ownerTableId: UUIDFilter + + """Filter by the object’s `tableName` field.""" + tableName: StringFilter + + """Checks for all expressions in this list.""" + and: [WebauthnCredentialsModuleFilter!] + + """Checks for any expressions in this list.""" + or: [WebauthnCredentialsModuleFilter!] + + """Negates the expression.""" + not: WebauthnCredentialsModuleFilter + + """Filter by the object’s `database` relation.""" + database: DatabaseFilter + + """Filter by the object’s `ownerTable` relation.""" + ownerTable: TableFilter + + """Filter by the object’s `privateSchema` relation.""" + privateSchema: SchemaFilter + + """Filter by the object’s `schema` relation.""" + schema: SchemaFilter + + """Filter by the object’s `table` relation.""" + table: TableFilter +} + """ A filter to be used against many `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ """ @@ -13898,6 +14430,162 @@ type Field { """Reads a single `Table` that is related to this `Field`.""" table: Table + + """Reads and enables pagination through a set of `SpatialRelation`.""" + spatialRelations( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: SpatialRelationFilter + + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!] = [PRIMARY_KEY_ASC] + ): SpatialRelationConnection! + + """Reads and enables pagination through a set of `SpatialRelation`.""" + spatialRelationsByRefFieldId( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: SpatialRelationFilter + + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!] = [PRIMARY_KEY_ASC] + ): SpatialRelationConnection! +} + +"""A connection to a list of `SpatialRelation` values.""" +type SpatialRelationConnection { + """A list of `SpatialRelation` objects.""" + nodes: [SpatialRelation]! + + """ + A list of edges which contains the `SpatialRelation` and cursor to aid in pagination. + """ + edges: [SpatialRelationEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `SpatialRelation` you could get from the connection. + """ + totalCount: Int! +} + +type SpatialRelation { + id: UUID! + databaseId: UUID! + tableId: UUID! + fieldId: UUID! + refTableId: UUID! + refFieldId: UUID! + name: String! + operator: String! + paramName: String + category: ObjectCategory! + module: String + scope: Int + tags: [String]! + createdAt: Datetime + updatedAt: Datetime + + """Reads a single `Database` that is related to this `SpatialRelation`.""" + database: Database + + """Reads a single `Field` that is related to this `SpatialRelation`.""" + field: Field + + """Reads a single `Field` that is related to this `SpatialRelation`.""" + refField: Field + + """Reads a single `Table` that is related to this `SpatialRelation`.""" + refTable: Table + + """Reads a single `Table` that is related to this `SpatialRelation`.""" + table: Table +} + +"""A `SpatialRelation` edge in the connection.""" +type SpatialRelationEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `SpatialRelation` at the end of the edge.""" + node: SpatialRelation +} + +"""Methods to use when ordering `SpatialRelation`.""" +enum SpatialRelationOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + TABLE_ID_ASC + TABLE_ID_DESC + FIELD_ID_ASC + FIELD_ID_DESC + REF_TABLE_ID_ASC + REF_TABLE_ID_DESC + REF_FIELD_ID_ASC + REF_FIELD_ID_DESC + NAME_ASC + NAME_DESC + OPERATOR_ASC + OPERATOR_DESC + PARAM_NAME_ASC + PARAM_NAME_DESC + CATEGORY_ASC + CATEGORY_DESC + MODULE_ASC + MODULE_DESC + SCOPE_ASC + SCOPE_DESC + TAGS_ASC + TAGS_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """A `Field` edge in the connection.""" @@ -15119,88 +15807,6 @@ enum EmbeddingChunkOrderBy { UPDATED_AT_DESC } -"""A connection to a list of `TableTemplateModule` values.""" -type TableTemplateModuleConnection { - """A list of `TableTemplateModule` objects.""" - nodes: [TableTemplateModule]! - - """ - A list of edges which contains the `TableTemplateModule` and cursor to aid in pagination. - """ - edges: [TableTemplateModuleEdge]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """ - The count of *all* `TableTemplateModule` you could get from the connection. - """ - totalCount: Int! -} - -type TableTemplateModule { - id: UUID! - databaseId: UUID! - schemaId: UUID! - privateSchemaId: UUID! - tableId: UUID! - ownerTableId: UUID! - tableName: String! - nodeType: String! - data: JSON! - - """ - Reads a single `Database` that is related to this `TableTemplateModule`. - """ - database: Database - - """Reads a single `Table` that is related to this `TableTemplateModule`.""" - ownerTable: Table - - """Reads a single `Schema` that is related to this `TableTemplateModule`.""" - privateSchema: Schema - - """Reads a single `Schema` that is related to this `TableTemplateModule`.""" - schema: Schema - - """Reads a single `Table` that is related to this `TableTemplateModule`.""" - table: Table -} - -"""A `TableTemplateModule` edge in the connection.""" -type TableTemplateModuleEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `TableTemplateModule` at the end of the edge.""" - node: TableTemplateModule -} - -"""Methods to use when ordering `TableTemplateModule`.""" -enum TableTemplateModuleOrderBy { - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - ID_ASC - ID_DESC - DATABASE_ID_ASC - DATABASE_ID_DESC - SCHEMA_ID_ASC - SCHEMA_ID_DESC - PRIVATE_SCHEMA_ID_ASC - PRIVATE_SCHEMA_ID_DESC - TABLE_ID_ASC - TABLE_ID_DESC - OWNER_TABLE_ID_ASC - OWNER_TABLE_ID_DESC - TABLE_NAME_ASC - TABLE_NAME_DESC - NODE_TYPE_ASC - NODE_TYPE_DESC - DATA_ASC - DATA_DESC -} - """A connection to a list of `SecureTableProvision` values.""" type SecureTableProvisionConnection { """A list of `SecureTableProvision` objects.""" @@ -15687,6 +16293,85 @@ enum RelationProvisionOrderBy { OUT_TARGET_FIELD_ID_DESC } +"""A connection to a list of `SessionSecretsModule` values.""" +type SessionSecretsModuleConnection { + """A list of `SessionSecretsModule` objects.""" + nodes: [SessionSecretsModule]! + + """ + A list of edges which contains the `SessionSecretsModule` and cursor to aid in pagination. + """ + edges: [SessionSecretsModuleEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `SessionSecretsModule` you could get from the connection. + """ + totalCount: Int! +} + +""" +Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. +""" +type SessionSecretsModule { + id: UUID! + databaseId: UUID! + schemaId: UUID! + tableId: UUID! + tableName: String! + + """ + Resolved reference to sessions_module.sessions_table, used to FK session_secrets.session_id with ON DELETE CASCADE. + """ + sessionsTableId: UUID! + + """ + Reads a single `Database` that is related to this `SessionSecretsModule`. + """ + database: Database + + """ + Reads a single `Schema` that is related to this `SessionSecretsModule`. + """ + schema: Schema + + """Reads a single `Table` that is related to this `SessionSecretsModule`.""" + sessionsTable: Table + + """Reads a single `Table` that is related to this `SessionSecretsModule`.""" + table: Table +} + +"""A `SessionSecretsModule` edge in the connection.""" +type SessionSecretsModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `SessionSecretsModule` at the end of the edge.""" + node: SessionSecretsModule +} + +"""Methods to use when ordering `SessionSecretsModule`.""" +enum SessionSecretsModuleOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + TABLE_ID_ASC + TABLE_ID_DESC + TABLE_NAME_ASC + TABLE_NAME_DESC + SESSIONS_TABLE_ID_ASC + SESSIONS_TABLE_ID_DESC +} + """A `Table` edge in the connection.""" type TableEdge { """A cursor for use in pagination.""" @@ -18039,6 +18724,7 @@ type MembershipsModule { entityIdsByMask: String entityIdsByPerm: String entityIdsFunction: String + memberProfilesTableId: UUID """Reads a single `Table` that is related to this `MembershipsModule`.""" actorTable: Table @@ -18162,6 +18848,8 @@ enum MembershipsModuleOrderBy { ENTITY_IDS_BY_PERM_DESC ENTITY_IDS_FUNCTION_ASC ENTITY_IDS_FUNCTION_DESC + MEMBER_PROFILES_TABLE_ID_ASC + MEMBER_PROFILES_TABLE_ID_DESC } """A connection to a list of `PermissionsModule` values.""" @@ -18720,8 +19408,8 @@ type UserAuthModule { checkPasswordFunction: String! sendAccountDeletionEmailFunction: String! deleteAccountFunction: String! - signInOneTimeTokenFunction: String! - oneTimeTokenFunction: String! + signInCrossOriginFunction: String! + requestCrossOriginTokenFunction: String! extendTokenExpires: String! """Reads a single `Database` that is related to this `UserAuthModule`.""" @@ -18809,10 +19497,10 @@ enum UserAuthModuleOrderBy { SEND_ACCOUNT_DELETION_EMAIL_FUNCTION_DESC DELETE_ACCOUNT_FUNCTION_ASC DELETE_ACCOUNT_FUNCTION_DESC - SIGN_IN_ONE_TIME_TOKEN_FUNCTION_ASC - SIGN_IN_ONE_TIME_TOKEN_FUNCTION_DESC - ONE_TIME_TOKEN_FUNCTION_ASC - ONE_TIME_TOKEN_FUNCTION_DESC + SIGN_IN_CROSS_ORIGIN_FUNCTION_ASC + SIGN_IN_CROSS_ORIGIN_FUNCTION_DESC + REQUEST_CROSS_ORIGIN_TOKEN_FUNCTION_ASC + REQUEST_CROSS_ORIGIN_TOKEN_FUNCTION_DESC EXTEND_TOKEN_EXPIRES_ASC EXTEND_TOKEN_EXPIRES_DESC } @@ -19541,6 +20229,237 @@ enum StorageModuleOrderBy { CACHE_TTL_SECONDS_DESC } +"""A connection to a list of `EntityTypeProvision` values.""" +type EntityTypeProvisionConnection { + """A list of `EntityTypeProvision` objects.""" + nodes: [EntityTypeProvision]! + + """ + A list of edges which contains the `EntityTypeProvision` and cursor to aid in pagination. + """ + edges: [EntityTypeProvisionEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `EntityTypeProvision` you could get from the connection. + """ + totalCount: Int! +} + +""" +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. +""" +type EntityTypeProvision { + """Unique identifier for this provision row.""" + id: UUID! + + """The database to provision this entity type in. Required.""" + databaseId: UUID! + + """ + Human-readable name for this membership type, e.g. 'Data Room Member', 'Team Channel Member'. Required. + Stored in the membership_types registry table. + """ + name: String! + + """ + SQL prefix used for table and module naming, e.g. 'data_room', 'team_channel'. Required. + Drives entity table name (prefix || 's' by default), module labels (permissions_module:prefix), + and membership table names (prefix_memberships, prefix_members, etc.). + Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING. + """ + prefix: String! + + """ + Description of this membership type. Stored in the membership_types registry table. Defaults to empty string. + """ + description: String! + + """ + Prefix of the parent entity type. The trigger resolves this to a membership_type integer + by looking up memberships_module WHERE prefix = parent_entity. + Defaults to 'org' (the organization-level type). For nested types, set to the parent's prefix + (e.g. 'data_room' for a team_channel nested under data_room). + The parent type must already be provisioned before this INSERT. + """ + parentEntity: String! + + """ + Override the entity table name. When NULL (default), the table name is derived as prefix || 's' + (e.g. prefix 'data_room' produces table 'data_rooms'). + Set this when the pluralization rule doesn't apply (e.g. prefix 'staff' should produce 'staff' not 'staffs'). + """ + tableName: String + + """ + Whether members of the parent entity can see child entities. Defaults to true. + When true: a SELECT policy allows parent members to list child entities (e.g. org members can see all data rooms). + When false: only direct members of the entity itself can see it (private entity mode). + Controls whether the parent_member SELECT policy is created on the entity table. + Only meaningful on the defaults path — ignored (no-op) when table_provision is non-NULL or + skip_entity_policies=true, since no default policies are being applied in those cases. + """ + isVisible: Boolean! + + """ + Whether to apply limits_module security for this type. Defaults to false. + The limits_module table structure is always created (memberships_module requires it), + but when false, no RLS policies are applied to the limits tables. + Set to true if this entity type needs configurable resource limits per membership. + """ + hasLimits: Boolean! + + """ + Whether to provision profiles_module for this type. Defaults to false. + Profiles provide named permission roles (e.g. 'Editor', 'Viewer') with pre-configured permission bitmasks. + When true, creates profile tables and applies profiles security. + """ + hasProfiles: Boolean! + + """ + Whether to provision levels_module for this type. Defaults to false. + Levels provide gamification/achievement tracking for members. + When true, creates level steps, achievements, and level tables with security. + """ + hasLevels: Boolean! + + """ + Escape hatch: when true, apply zero RLS policies to the entity table. Defaults to false. + Use this only when you want the entity table provisioned with zero policies (e.g. because you + plan to insert secure_table_provision rows yourself later). In most cases, prefer leaving this + false and either accepting the five defaults (table_provision=NULL) or overriding them via + table_provision. + Defaults (applied when table_provision IS NULL and skip_entity_policies=false): + - SELECT (parent_member): parent entity members can see child entities (only when is_visible=true) + - SELECT (self_member): direct members of the entity can see it + - INSERT: create_entity permission on the parent entity + - UPDATE: admin_entity permission on the entity itself + - DELETE: owner of the entity can delete it + """ + skipEntityPolicies: Boolean! + + """ + Single jsonb object describing the full security setup to apply to the entity table. + Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + entries, so an entity table is configured the same way an ordinary blueprint table is. + Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by + table_provision.policies[] (is_visible becomes a no-op on this path). + Recognized keys (all optional): + - use_rls (boolean, default true) + - nodes (jsonb array of {"$type","data"} Data* module entries) + - fields (jsonb array of field objects: name,type,is_required,default,min,max,regexp,index) + - grant_privileges (jsonb array of [privilege, columns] tuples) + - grant_roles (jsonb array of role names; defaults to ["authenticated"]) + - policies (jsonb array of policy objects; each with $type, privileges, data, name, role, permissive) + The trigger fans policies[] into N secure_table_provision rows against the newly created entity table, + with table-level setup (nodes/fields/grants) attached to the first row. + Example — override with two SELECT policies: + table_provision := jsonb_build_object( + 'policies', jsonb_build_array( + jsonb_build_object( + '$type', 'AuthzEntityMembership', + 'privileges', jsonb_build_array('select'), + 'data', jsonb_build_object('entity_field', 'id', 'membership_type', 3), + 'name', 'self_member' + ), + jsonb_build_object( + '$type', 'AuthzDirectOwner', + 'privileges', jsonb_build_array('select', 'update'), + 'data', jsonb_build_object('owner_field', 'owner_id') + ) + ) + ) + """ + tableProvision: JSON + + """ + Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning. + This is the ID used in membership_types, memberships_module, and all module tables. + """ + outMembershipType: Int + + """ + Output: the UUID of the created entity table. Populated by the trigger. + Use this to reference the entity table in subsequent relation_provision or secure_table_provision rows. + """ + outEntityTableId: UUID + + """ + Output: the name of the created entity table (e.g. 'data_rooms'). Populated by the trigger. + """ + outEntityTableName: String + + """ + Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + Populated by the trigger. Useful for verifying which modules were provisioned. + """ + outInstalledModules: [String] + + """ + Reads a single `Database` that is related to this `EntityTypeProvision`. + """ + database: Database +} + +"""A `EntityTypeProvision` edge in the connection.""" +type EntityTypeProvisionEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `EntityTypeProvision` at the end of the edge.""" + node: EntityTypeProvision +} + +"""Methods to use when ordering `EntityTypeProvision`.""" +enum EntityTypeProvisionOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + NAME_ASC + NAME_DESC + PREFIX_ASC + PREFIX_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + PARENT_ENTITY_ASC + PARENT_ENTITY_DESC + TABLE_NAME_ASC + TABLE_NAME_DESC + IS_VISIBLE_ASC + IS_VISIBLE_DESC + HAS_LIMITS_ASC + HAS_LIMITS_DESC + HAS_PROFILES_ASC + HAS_PROFILES_DESC + HAS_LEVELS_ASC + HAS_LEVELS_DESC + SKIP_ENTITY_POLICIES_ASC + SKIP_ENTITY_POLICIES_DESC + TABLE_PROVISION_ASC + TABLE_PROVISION_DESC + OUT_MEMBERSHIP_TYPE_ASC + OUT_MEMBERSHIP_TYPE_DESC + OUT_ENTITY_TABLE_ID_ASC + OUT_ENTITY_TABLE_ID_DESC + OUT_ENTITY_TABLE_NAME_ASC + OUT_ENTITY_TABLE_NAME_DESC + OUT_INSTALLED_MODULES_ASC + OUT_INSTALLED_MODULES_DESC +} + type RateLimitsModule { id: UUID! databaseId: UUID! @@ -19568,6 +20487,119 @@ type RateLimitsModule { schema: Schema } +type DevicesModule { + id: UUID! + databaseId: UUID! + schemaId: UUID! + userDevicesTableId: UUID! + deviceSettingsTableId: UUID! + userDevicesTable: String! + deviceSettingsTable: String! + + """Reads a single `Database` that is related to this `DevicesModule`.""" + database: Database + + """Reads a single `Table` that is related to this `DevicesModule`.""" + deviceSettingsTableByDeviceSettingsTableId: Table + + """Reads a single `Schema` that is related to this `DevicesModule`.""" + schema: Schema + + """Reads a single `Table` that is related to this `DevicesModule`.""" + userDevicesTableByUserDevicesTableId: Table +} + +"""A connection to a list of `WebauthnCredentialsModule` values.""" +type WebauthnCredentialsModuleConnection { + """A list of `WebauthnCredentialsModule` objects.""" + nodes: [WebauthnCredentialsModule]! + + """ + A list of edges which contains the `WebauthnCredentialsModule` and cursor to aid in pagination. + """ + edges: [WebauthnCredentialsModuleEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `WebauthnCredentialsModule` you could get from the connection. + """ + totalCount: Int! +} + +""" +Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. +""" +type WebauthnCredentialsModule { + id: UUID! + databaseId: UUID! + schemaId: UUID! + + """ + Reserved for future SECURITY DEFINER helpers on webauthn_credentials; unused in Phase 11a. + """ + privateSchemaId: UUID! + tableId: UUID! + ownerTableId: UUID! + tableName: String! + + """ + Reads a single `Database` that is related to this `WebauthnCredentialsModule`. + """ + database: Database + + """ + Reads a single `Table` that is related to this `WebauthnCredentialsModule`. + """ + ownerTable: Table + + """ + Reads a single `Schema` that is related to this `WebauthnCredentialsModule`. + """ + privateSchema: Schema + + """ + Reads a single `Schema` that is related to this `WebauthnCredentialsModule`. + """ + schema: Schema + + """ + Reads a single `Table` that is related to this `WebauthnCredentialsModule`. + """ + table: Table +} + +"""A `WebauthnCredentialsModule` edge in the connection.""" +type WebauthnCredentialsModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `WebauthnCredentialsModule` at the end of the edge.""" + node: WebauthnCredentialsModule +} + +"""Methods to use when ordering `WebauthnCredentialsModule`.""" +enum WebauthnCredentialsModuleOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + PRIVATE_SCHEMA_ID_ASC + PRIVATE_SCHEMA_ID_DESC + TABLE_ID_ASC + TABLE_ID_DESC + OWNER_TABLE_ID_ASC + OWNER_TABLE_ID_DESC + TABLE_NAME_ASC + TABLE_NAME_DESC +} + """A connection to a list of `DatabaseProvisionModule` values.""" type DatabaseProvisionModuleConnection { """A list of `DatabaseProvisionModule` objects.""" @@ -19737,6 +20769,11 @@ type AppMembership { """ isActive: Boolean! + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean! + """Whether the actor is the owner of this entity""" isOwner: Boolean! @@ -20004,6 +21041,11 @@ type OrgMembership { """ isActive: Boolean! + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean! + """Whether the actor is the owner of this entity""" isOwner: Boolean! @@ -20025,6 +21067,9 @@ type OrgMembership { """References the entity (org or group) this membership belongs to""" entityId: UUID! + + """Whether this member has read-only access (blocks mutations when true)""" + isReadOnly: Boolean! profileId: UUID """Reads a single `User` that is related to this `OrgMembership`.""" @@ -20032,6 +21077,57 @@ type OrgMembership { """Reads a single `User` that is related to this `OrgMembership`.""" entity: User + + """ + Reads a single `OrgMemberProfile` that is related to this `OrgMembership`. + """ + orgMemberProfileByMembershipId: OrgMemberProfile +} + +""" +Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) +""" +type OrgMemberProfile { + id: UUID! + createdAt: Datetime + updatedAt: Datetime + + """References the membership this profile belongs to (1:1)""" + membershipId: UUID! + + """References the entity this profile belongs to (used for RLS lookups)""" + entityId: UUID! + + """References the user who owns this profile (for self-edit RLS)""" + actorId: UUID! + + """Display name shown to other entity members""" + displayName: String + + """ + Email address visible to other entity members (auto-populated from verified primary email) + """ + email: String + + """Job title or role description visible to other entity members""" + title: String + + """Short biography visible to other entity members""" + bio: String + + """Profile picture visible to other entity members""" + profilePicture: ConstructiveInternalTypeImage + + """Reads a single `User` that is related to this `OrgMemberProfile`.""" + actor: User + + """Reads a single `User` that is related to this `OrgMemberProfile`.""" + entity: User + + """ + Reads a single `OrgMembership` that is related to this `OrgMemberProfile`. + """ + membership: OrgMembership } """A `OrgMembership` edge in the connection.""" @@ -20066,6 +21162,8 @@ enum OrgMembershipOrderBy { IS_DISABLED_DESC IS_ACTIVE_ASC IS_ACTIVE_DESC + IS_EXTERNAL_ASC + IS_EXTERNAL_DESC IS_OWNER_ASC IS_OWNER_DESC IS_ADMIN_ASC @@ -20078,6 +21176,8 @@ enum OrgMembershipOrderBy { ACTOR_ID_DESC ENTITY_ID_ASC ENTITY_ID_DESC + IS_READ_ONLY_ASC + IS_READ_ONLY_DESC PROFILE_ID_ASC PROFILE_ID_DESC } @@ -20321,6 +21421,63 @@ enum OrgOwnerGrantOrderBy { UPDATED_AT_DESC } +"""A connection to a list of `OrgMemberProfile` values.""" +type OrgMemberProfileConnection { + """A list of `OrgMemberProfile` objects.""" + nodes: [OrgMemberProfile]! + + """ + A list of edges which contains the `OrgMemberProfile` and cursor to aid in pagination. + """ + edges: [OrgMemberProfileEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """ + The count of *all* `OrgMemberProfile` you could get from the connection. + """ + totalCount: Int! +} + +"""A `OrgMemberProfile` edge in the connection.""" +type OrgMemberProfileEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `OrgMemberProfile` at the end of the edge.""" + node: OrgMemberProfile +} + +"""Methods to use when ordering `OrgMemberProfile`.""" +enum OrgMemberProfileOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC + MEMBERSHIP_ID_ASC + MEMBERSHIP_ID_DESC + ENTITY_ID_ASC + ENTITY_ID_DESC + ACTOR_ID_ASC + ACTOR_ID_DESC + DISPLAY_NAME_ASC + DISPLAY_NAME_DESC + EMAIL_ASC + EMAIL_DESC + TITLE_ASC + TITLE_DESC + BIO_ASC + BIO_DESC + PROFILE_PICTURE_ASC + PROFILE_PICTURE_DESC +} + """A connection to a list of `OrgGrant` values.""" type OrgGrantConnection { """A list of `OrgGrant` objects.""" @@ -21183,82 +22340,6 @@ enum CryptoAddressOrderBy { UPDATED_AT_DESC } -"""A connection to a list of `ConnectedAccount` values.""" -type ConnectedAccountConnection { - """A list of `ConnectedAccount` objects.""" - nodes: [ConnectedAccount]! - - """ - A list of edges which contains the `ConnectedAccount` and cursor to aid in pagination. - """ - edges: [ConnectedAccountEdge]! - - """Information to aid in pagination.""" - pageInfo: PageInfo! - - """ - The count of *all* `ConnectedAccount` you could get from the connection. - """ - totalCount: Int! -} - -""" -OAuth and social login connections linking external service accounts to users -""" -type ConnectedAccount { - id: UUID! - ownerId: UUID! - - """The service used, e.g. `twitter` or `github`.""" - service: String! - - """A unique identifier for the user within the service""" - identifier: String! - - """Additional profile details extracted from this login method""" - details: JSON! - - """Whether this connected account has been verified""" - isVerified: Boolean! - createdAt: Datetime - updatedAt: Datetime - - """Reads a single `User` that is related to this `ConnectedAccount`.""" - owner: User -} - -"""A `ConnectedAccount` edge in the connection.""" -type ConnectedAccountEdge { - """A cursor for use in pagination.""" - cursor: Cursor - - """The `ConnectedAccount` at the end of the edge.""" - node: ConnectedAccount -} - -"""Methods to use when ordering `ConnectedAccount`.""" -enum ConnectedAccountOrderBy { - NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC - ID_ASC - ID_DESC - OWNER_ID_ASC - OWNER_ID_DESC - SERVICE_ASC - SERVICE_DESC - IDENTIFIER_ASC - IDENTIFIER_DESC - DETAILS_ASC - DETAILS_DESC - IS_VERIFIED_ASC - IS_VERIFIED_DESC - CREATED_AT_ASC - CREATED_AT_DESC - UPDATED_AT_ASC - UPDATED_AT_DESC -} - """A connection to a list of `AppInvite` values.""" type AppInviteConnection { """A list of `AppInvite` objects.""" @@ -22252,92 +23333,149 @@ enum OrgLimitDefaultOrderBy { MAX_DESC } -"""A connection to a list of `MembershipType` values.""" -type MembershipTypeConnection { - """A list of `MembershipType` objects.""" - nodes: [MembershipType]! +"""A connection to a list of `DevicesModule` values.""" +type DevicesModuleConnection { + """A list of `DevicesModule` objects.""" + nodes: [DevicesModule]! """ - A list of edges which contains the `MembershipType` and cursor to aid in pagination. + A list of edges which contains the `DevicesModule` and cursor to aid in pagination. """ - edges: [MembershipTypeEdge]! + edges: [DevicesModuleEdge]! """Information to aid in pagination.""" pageInfo: PageInfo! - """The count of *all* `MembershipType` you could get from the connection.""" + """The count of *all* `DevicesModule` you could get from the connection.""" totalCount: Int! } -""" -Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) -""" -type MembershipType { +"""A `DevicesModule` edge in the connection.""" +type DevicesModuleEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `DevicesModule` at the end of the edge.""" + node: DevicesModule +} + +"""Methods to use when ordering `DevicesModule`.""" +enum DevicesModuleOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + DATABASE_ID_ASC + DATABASE_ID_DESC + SCHEMA_ID_ASC + SCHEMA_ID_DESC + USER_DEVICES_TABLE_ID_ASC + USER_DEVICES_TABLE_ID_DESC + DEVICE_SETTINGS_TABLE_ID_ASC + DEVICE_SETTINGS_TABLE_ID_DESC + USER_DEVICES_TABLE_ASC + USER_DEVICES_TABLE_DESC + DEVICE_SETTINGS_TABLE_ASC + DEVICE_SETTINGS_TABLE_DESC +} + +"""A connection to a list of `UserConnectedAccount` values.""" +type UserConnectedAccountConnection { + """A list of `UserConnectedAccount` objects.""" + nodes: [UserConnectedAccount]! + """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + A list of edges which contains the `UserConnectedAccount` and cursor to aid in pagination. """ - id: Int! + edges: [UserConnectedAccountEdge]! - """Human-readable name of the membership type""" - name: String! - - """Description of what this membership type represents""" - description: String! + """Information to aid in pagination.""" + pageInfo: PageInfo! """ - Short prefix used to namespace tables and functions for this membership scope + The count of *all* `UserConnectedAccount` you could get from the connection. """ - prefix: String! + totalCount: Int! } -"""A `MembershipType` edge in the connection.""" -type MembershipTypeEdge { +type UserConnectedAccount { + id: UUID + ownerId: UUID + service: String + identifier: String + details: JSON + isVerified: Boolean + createdAt: Datetime + updatedAt: Datetime +} + +"""A `UserConnectedAccount` edge in the connection.""" +type UserConnectedAccountEdge { """A cursor for use in pagination.""" cursor: Cursor - """The `MembershipType` at the end of the edge.""" - node: MembershipType + """The `UserConnectedAccount` at the end of the edge.""" + node: UserConnectedAccount } """ -A filter to be used against `MembershipType` object types. All fields are combined with a logical ‘and.’ +A filter to be used against `UserConnectedAccount` object types. All fields are combined with a logical ‘and.’ """ -input MembershipTypeFilter { +input UserConnectedAccountFilter { """Filter by the object’s `id` field.""" - id: IntFilter + id: UUIDFilter - """Filter by the object’s `name` field.""" - name: StringFilter + """Filter by the object’s `ownerId` field.""" + ownerId: UUIDFilter - """Filter by the object’s `description` field.""" - description: StringFilter + """Filter by the object’s `service` field.""" + service: StringFilter - """Filter by the object’s `prefix` field.""" - prefix: StringFilter + """Filter by the object’s `identifier` field.""" + identifier: StringFilter + + """Filter by the object’s `details` field.""" + details: JSONFilter + + """Filter by the object’s `isVerified` field.""" + isVerified: BooleanFilter + + """Filter by the object’s `createdAt` field.""" + createdAt: DatetimeFilter + + """Filter by the object’s `updatedAt` field.""" + updatedAt: DatetimeFilter """Checks for all expressions in this list.""" - and: [MembershipTypeFilter!] + and: [UserConnectedAccountFilter!] """Checks for any expressions in this list.""" - or: [MembershipTypeFilter!] + or: [UserConnectedAccountFilter!] """Negates the expression.""" - not: MembershipTypeFilter + not: UserConnectedAccountFilter } -"""Methods to use when ordering `MembershipType`.""" -enum MembershipTypeOrderBy { +"""Methods to use when ordering `UserConnectedAccount`.""" +enum UserConnectedAccountOrderBy { NATURAL - PRIMARY_KEY_ASC - PRIMARY_KEY_DESC ID_ASC ID_DESC - NAME_ASC - NAME_DESC - DESCRIPTION_ASC - DESCRIPTION_DESC - PREFIX_ASC - PREFIX_DESC + OWNER_ID_ASC + OWNER_ID_DESC + SERVICE_ASC + SERVICE_DESC + IDENTIFIER_ASC + IDENTIFIER_DESC + DETAILS_ASC + DETAILS_DESC + IS_VERIFIED_ASC + IS_VERIFIED_DESC + CREATED_AT_ASC + CREATED_AT_DESC + UPDATED_AT_ASC + UPDATED_AT_DESC } """ @@ -22760,6 +23898,114 @@ enum RateLimitsModuleOrderBy { RATE_LIMITS_TABLE_DESC } +"""A connection to a list of `MembershipType` values.""" +type MembershipTypeConnection { + """A list of `MembershipType` objects.""" + nodes: [MembershipType]! + + """ + A list of edges which contains the `MembershipType` and cursor to aid in pagination. + """ + edges: [MembershipTypeEdge]! + + """Information to aid in pagination.""" + pageInfo: PageInfo! + + """The count of *all* `MembershipType` you could get from the connection.""" + totalCount: Int! +} + +""" +Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) +""" +type MembershipType { + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int! + + """Human-readable name of the membership type""" + name: String! + + """Description of what this membership type represents""" + description: String! + + """ + Short prefix used to namespace tables and functions for this membership scope + """ + prefix: String! + + """ + Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + """ + parentMembershipType: Int + + """ + When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs + """ + hasUsersTableEntry: Boolean! +} + +"""A `MembershipType` edge in the connection.""" +type MembershipTypeEdge { + """A cursor for use in pagination.""" + cursor: Cursor + + """The `MembershipType` at the end of the edge.""" + node: MembershipType +} + +""" +A filter to be used against `MembershipType` object types. All fields are combined with a logical ‘and.’ +""" +input MembershipTypeFilter { + """Filter by the object’s `id` field.""" + id: IntFilter + + """Filter by the object’s `name` field.""" + name: StringFilter + + """Filter by the object’s `description` field.""" + description: StringFilter + + """Filter by the object’s `prefix` field.""" + prefix: StringFilter + + """Filter by the object’s `parentMembershipType` field.""" + parentMembershipType: IntFilter + + """Filter by the object’s `hasUsersTableEntry` field.""" + hasUsersTableEntry: BooleanFilter + + """Checks for all expressions in this list.""" + and: [MembershipTypeFilter!] + + """Checks for any expressions in this list.""" + or: [MembershipTypeFilter!] + + """Negates the expression.""" + not: MembershipTypeFilter +} + +"""Methods to use when ordering `MembershipType`.""" +enum MembershipTypeOrderBy { + NATURAL + PRIMARY_KEY_ASC + PRIMARY_KEY_DESC + ID_ASC + ID_DESC + NAME_ASC + NAME_DESC + DESCRIPTION_ASC + DESCRIPTION_DESC + PREFIX_ASC + PREFIX_DESC + PARENT_MEMBERSHIP_TYPE_ASC + PARENT_MEMBERSHIP_TYPE_DESC + HAS_USERS_TABLE_ENTRY_ASC + HAS_USERS_TABLE_ENTRY_DESC +} + """A connection to a list of `OrgMembershipDefault` values.""" type OrgMembershipDefaultConnection { """A list of `OrgMembershipDefault` objects.""" @@ -23284,6 +24530,8 @@ enum AppMembershipOrderBy { IS_VERIFIED_DESC IS_ACTIVE_ASC IS_ACTIVE_DESC + IS_EXTERNAL_ASC + IS_EXTERNAL_DESC IS_OWNER_ASC IS_OWNER_DESC IS_ADMIN_ASC @@ -23645,6 +24893,81 @@ input RejectDatabaseTransferInput { transferId: UUID } +"""The output of our `disconnectAccount` mutation.""" +type DisconnectAccountPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: Boolean + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `disconnectAccount` mutation.""" +input DisconnectAccountInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + accountId: UUID! +} + +"""The output of our `revokeApiKey` mutation.""" +type RevokeApiKeyPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: Boolean + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `revokeApiKey` mutation.""" +input RevokeApiKeyInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + keyId: UUID! +} + +"""The output of our `revokeSession` mutation.""" +type RevokeSessionPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: Boolean + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `revokeSession` mutation.""" +input RevokeSessionInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + sessionId: UUID! +} + """The output of our `verifyPassword` mutation.""" type VerifyPasswordPayload { """ @@ -23923,6 +25246,32 @@ input ConstructBlueprintInput { schemaId: UUID } +"""The output of our `provisionNewUser` mutation.""" +type ProvisionNewUserPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: UUID + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `provisionNewUser` mutation.""" +input ProvisionNewUserInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + email: String + password: String +} + """The output of our `resetPassword` mutation.""" type ResetPasswordPayload { """ @@ -24006,6 +25355,70 @@ input CopyTemplateToBlueprintInput { displayNameOverride: String } +"""The output of our `createApiKey` mutation.""" +type CreateApiKeyPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: CreateApiKeyRecord + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +type CreateApiKeyRecord { + apiKey: String + keyId: UUID +} + +"""All input for the `createApiKey` mutation.""" +input CreateApiKeyInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + keyName: String! + accessLevel: String + mfaLevel: String +} + +"""The output of our `provisionSpatialRelation` mutation.""" +type ProvisionSpatialRelationPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + result: UUID + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query +} + +"""All input for the `provisionSpatialRelation` mutation.""" +input ProvisionSpatialRelationInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + pDatabaseId: UUID + pSourceTableId: UUID + pSourceFieldId: UUID + pTargetTableId: UUID + pTargetFieldId: UUID + pName: String + pOperator: String + pParamName: String +} + """The output of our `bootstrapUser` mutation.""" type BootstrapUserPayload { """ @@ -24415,14 +25828,14 @@ input ApplyRlsInput { name: String } -"""The output of our `signInOneTimeToken` mutation.""" -type SignInOneTimeTokenPayload { +"""The output of our `signInCrossOrigin` mutation.""" +type SignInCrossOriginPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - result: SignInOneTimeTokenRecord + result: SignInCrossOriginRecord """ Our root query field type. Allows us to run any query from our mutation payload. @@ -24430,7 +25843,7 @@ type SignInOneTimeTokenPayload { query: Query } -type SignInOneTimeTokenRecord { +type SignInCrossOriginRecord { id: UUID userId: UUID accessToken: String @@ -24439,8 +25852,8 @@ type SignInOneTimeTokenRecord { totpEnabled: Boolean } -"""All input for the `signInOneTimeToken` mutation.""" -input SignInOneTimeTokenInput { +"""All input for the `signInCrossOrigin` mutation.""" +input SignInCrossOriginInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -24512,14 +25925,14 @@ input ExtendTokenExpiresInput { amount: IntervalInput } -"""The output of our `signIn` mutation.""" -type SignInPayload { +"""The output of our `signUp` mutation.""" +type SignUpPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - result: SignInRecord + result: SignUpRecord """ Our root query field type. Allows us to run any query from our mutation payload. @@ -24527,7 +25940,7 @@ type SignInPayload { query: Query } -type SignInRecord { +type SignUpRecord { id: UUID userId: UUID accessToken: String @@ -24536,8 +25949,8 @@ type SignInRecord { totpEnabled: Boolean } -"""All input for the `signIn` mutation.""" -input SignInInput { +"""All input for the `signUp` mutation.""" +input SignUpInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -24550,14 +25963,14 @@ input SignInInput { csrfToken: String } -"""The output of our `signUp` mutation.""" -type SignUpPayload { +"""The output of our `requestCrossOriginToken` mutation.""" +type RequestCrossOriginTokenPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - result: SignUpRecord + result: String """ Our root query field type. Allows us to run any query from our mutation payload. @@ -24565,17 +25978,8 @@ type SignUpPayload { query: Query } -type SignUpRecord { - id: UUID - userId: UUID - accessToken: String - accessTokenExpiresAt: Datetime - isVerified: Boolean - totpEnabled: Boolean -} - -"""All input for the `signUp` mutation.""" -input SignUpInput { +"""All input for the `requestCrossOriginToken` mutation.""" +input RequestCrossOriginTokenInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -24583,19 +25987,18 @@ input SignUpInput { clientMutationId: String email: String password: String + origin: ConstructiveInternalTypeOrigin rememberMe: Boolean - credentialKind: String - csrfToken: String } -"""The output of our `oneTimeToken` mutation.""" -type OneTimeTokenPayload { +"""The output of our `signIn` mutation.""" +type SignInPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - result: String + result: SignInRecord """ Our root query field type. Allows us to run any query from our mutation payload. @@ -24603,8 +26006,19 @@ type OneTimeTokenPayload { query: Query } -"""All input for the `oneTimeToken` mutation.""" -input OneTimeTokenInput { +type SignInRecord { + id: UUID + userId: UUID + accessToken: String + accessTokenExpiresAt: Datetime + isVerified: Boolean + totpEnabled: Boolean + mfaRequired: Boolean + mfaChallengeToken: String +} + +"""All input for the `signIn` mutation.""" +input SignInInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. @@ -24612,8 +26026,10 @@ input OneTimeTokenInput { clientMutationId: String email: String password: String - origin: ConstructiveInternalTypeOrigin rememberMe: Boolean + credentialKind: String + csrfToken: String + deviceToken: String } """The output of our `provisionTable` mutation.""" @@ -25547,6 +26963,55 @@ input ViewRuleInput { action: String } +"""The output of our create `SessionSecretsModule` mutation.""" +type CreateSessionSecretsModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `SessionSecretsModule` that was created by this mutation.""" + sessionSecretsModule: SessionSecretsModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SessionSecretsModule`. May be used by Relay 1.""" + sessionSecretsModuleEdge( + """The method to use when ordering `SessionSecretsModule`.""" + orderBy: [SessionSecretsModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): SessionSecretsModuleEdge +} + +"""All input for the create `SessionSecretsModule` mutation.""" +input CreateSessionSecretsModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `SessionSecretsModule` to be created by this mutation.""" + sessionSecretsModule: SessionSecretsModuleInput! +} + +"""An input for mutations affecting `SessionSecretsModule`""" +input SessionSecretsModuleInput { + id: UUID + databaseId: UUID! + schemaId: UUID + tableId: UUID + tableName: String + + """ + Resolved reference to sessions_module.sessions_table, used to FK session_secrets.session_id with ON DELETE CASCADE. + """ + sessionsTableId: UUID +} + """The output of our create `AppAdminGrant` mutation.""" type CreateAppAdminGrantPayload { """ @@ -25970,6 +27435,52 @@ input ConnectedAccountsModuleInput { tableName: String! } +"""The output of our create `DevicesModule` mutation.""" +type CreateDevicesModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `DevicesModule` that was created by this mutation.""" + devicesModule: DevicesModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `DevicesModule`. May be used by Relay 1.""" + devicesModuleEdge( + """The method to use when ordering `DevicesModule`.""" + orderBy: [DevicesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): DevicesModuleEdge +} + +"""All input for the create `DevicesModule` mutation.""" +input CreateDevicesModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `DevicesModule` to be created by this mutation.""" + devicesModule: DevicesModuleInput! +} + +"""An input for mutations affecting `DevicesModule`""" +input DevicesModuleInput { + id: UUID + databaseId: UUID! + schemaId: UUID + userDevicesTableId: UUID + deviceSettingsTableId: UUID + userDevicesTable: String + deviceSettingsTable: String +} + """The output of our create `EmailsModule` mutation.""" type CreateEmailsModulePayload { """ @@ -26108,6 +27619,56 @@ input UsersModuleInput { typeTableName: String } +"""The output of our create `WebauthnCredentialsModule` mutation.""" +type CreateWebauthnCredentialsModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `WebauthnCredentialsModule` that was created by this mutation.""" + webauthnCredentialsModule: WebauthnCredentialsModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `WebauthnCredentialsModule`. May be used by Relay 1.""" + webauthnCredentialsModuleEdge( + """The method to use when ordering `WebauthnCredentialsModule`.""" + orderBy: [WebauthnCredentialsModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): WebauthnCredentialsModuleEdge +} + +"""All input for the create `WebauthnCredentialsModule` mutation.""" +input CreateWebauthnCredentialsModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `WebauthnCredentialsModule` to be created by this mutation.""" + webauthnCredentialsModule: WebauthnCredentialsModuleInput! +} + +"""An input for mutations affecting `WebauthnCredentialsModule`""" +input WebauthnCredentialsModuleInput { + id: UUID + databaseId: UUID! + schemaId: UUID + + """ + Reserved for future SECURITY DEFINER helpers on webauthn_credentials; unused in Phase 11a. + """ + privateSchemaId: UUID + tableId: UUID + ownerTableId: UUID + tableName: String +} + """The output of our create `OrgAdminGrant` mutation.""" type CreateOrgAdminGrantPayload { """ @@ -26266,58 +27827,45 @@ input CryptoAddressInput { updatedAt: Datetime } -"""The output of our create `MembershipType` mutation.""" -type CreateMembershipTypePayload { +"""The output of our create `UserConnectedAccount` mutation.""" +type CreateUserConnectedAccountPayload { """ The exact same `clientMutationId` that was provided in the mutation input, unchanged and unused. May be used by a client to track mutations. """ clientMutationId: String - """The `MembershipType` that was created by this mutation.""" - membershipType: MembershipType + """The `UserConnectedAccount` that was created by this mutation.""" + userConnectedAccount: UserConnectedAccount """ Our root query field type. Allows us to run any query from our mutation payload. """ query: Query - - """An edge for our `MembershipType`. May be used by Relay 1.""" - membershipTypeEdge( - """The method to use when ordering `MembershipType`.""" - orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] - ): MembershipTypeEdge } -"""All input for the create `MembershipType` mutation.""" -input CreateMembershipTypeInput { +"""All input for the create `UserConnectedAccount` mutation.""" +input CreateUserConnectedAccountInput { """ An arbitrary string value with no semantic meaning. Will be included in the payload verbatim. May be used to track mutations by the client. """ clientMutationId: String - """The `MembershipType` to be created by this mutation.""" - membershipType: MembershipTypeInput! + """The `UserConnectedAccount` to be created by this mutation.""" + userConnectedAccount: UserConnectedAccountInput! } -"""An input for mutations affecting `MembershipType`""" -input MembershipTypeInput { - """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) - """ - id: Int! - - """Human-readable name of the membership type""" - name: String! - - """Description of what this membership type represents""" - description: String! - - """ - Short prefix used to namespace tables and functions for this membership scope - """ - prefix: String! +"""An input for mutations affecting `UserConnectedAccount`""" +input UserConnectedAccountInput { + id: UUID + ownerId: UUID + service: String + identifier: String + details: JSON + isVerified: Boolean + createdAt: Datetime + updatedAt: Datetime } """The output of our create `Object` mutation.""" @@ -26460,61 +28008,6 @@ input CryptoAddressesModuleInput { cryptoNetwork: String } -"""The output of our create `ConnectedAccount` mutation.""" -type CreateConnectedAccountPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `ConnectedAccount` that was created by this mutation.""" - connectedAccount: ConnectedAccount - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `ConnectedAccount`. May be used by Relay 1.""" - connectedAccountEdge( - """The method to use when ordering `ConnectedAccount`.""" - orderBy: [ConnectedAccountOrderBy!]! = [PRIMARY_KEY_ASC] - ): ConnectedAccountEdge -} - -"""All input for the create `ConnectedAccount` mutation.""" -input CreateConnectedAccountInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `ConnectedAccount` to be created by this mutation.""" - connectedAccount: ConnectedAccountInput! -} - -"""An input for mutations affecting `ConnectedAccount`""" -input ConnectedAccountInput { - id: UUID - ownerId: UUID - - """The service used, e.g. `twitter` or `github`.""" - service: String! - - """A unique identifier for the user within the service""" - identifier: String! - - """Additional profile details extracted from this login method""" - details: JSON! - - """Whether this connected account has been verified""" - isVerified: Boolean - createdAt: Datetime - updatedAt: Datetime -} - """The output of our create `PhoneNumber` mutation.""" type CreatePhoneNumberPayload { """ @@ -27194,54 +28687,6 @@ input RateLimitsModuleInput { rateLimitsTable: String } -"""The output of our create `TableTemplateModule` mutation.""" -type CreateTableTemplateModulePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `TableTemplateModule` that was created by this mutation.""" - tableTemplateModule: TableTemplateModule - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `TableTemplateModule`. May be used by Relay 1.""" - tableTemplateModuleEdge( - """The method to use when ordering `TableTemplateModule`.""" - orderBy: [TableTemplateModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): TableTemplateModuleEdge -} - -"""All input for the create `TableTemplateModule` mutation.""" -input CreateTableTemplateModuleInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `TableTemplateModule` to be created by this mutation.""" - tableTemplateModule: TableTemplateModuleInput! -} - -"""An input for mutations affecting `TableTemplateModule`""" -input TableTemplateModuleInput { - id: UUID - databaseId: UUID! - schemaId: UUID - privateSchemaId: UUID - tableId: UUID - ownerTableId: UUID - tableName: String! - nodeType: String! - data: JSON -} - """The output of our create `OrgChartEdgeGrant` mutation.""" type CreateOrgChartEdgeGrantPayload { """ @@ -27361,6 +28806,70 @@ input OrgLimitInput { entityId: UUID! } +"""The output of our create `MembershipType` mutation.""" +type CreateMembershipTypePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `MembershipType` that was created by this mutation.""" + membershipType: MembershipType + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `MembershipType`. May be used by Relay 1.""" + membershipTypeEdge( + """The method to use when ordering `MembershipType`.""" + orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): MembershipTypeEdge +} + +"""All input for the create `MembershipType` mutation.""" +input CreateMembershipTypeInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `MembershipType` to be created by this mutation.""" + membershipType: MembershipTypeInput! +} + +"""An input for mutations affecting `MembershipType`""" +input MembershipTypeInput { + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int! + + """Human-readable name of the membership type""" + name: String! + + """Description of what this membership type represents""" + description: String! + + """ + Short prefix used to namespace tables and functions for this membership scope + """ + prefix: String! + + """ + Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + """ + parentMembershipType: Int + + """ + When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs + """ + hasUsersTableEntry: Boolean +} + """The output of our create `Domain` mutation.""" type CreateDomainPayload { """ @@ -28239,6 +29748,74 @@ input DenormalizedTableFieldInput { funcOrder: Int } +"""The output of our create `OrgMemberProfile` mutation.""" +type CreateOrgMemberProfilePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgMemberProfile` that was created by this mutation.""" + orgMemberProfile: OrgMemberProfile + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `OrgMemberProfile`. May be used by Relay 1.""" + orgMemberProfileEdge( + """The method to use when ordering `OrgMemberProfile`.""" + orderBy: [OrgMemberProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMemberProfileEdge +} + +"""All input for the create `OrgMemberProfile` mutation.""" +input CreateOrgMemberProfileInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `OrgMemberProfile` to be created by this mutation.""" + orgMemberProfile: OrgMemberProfileInput! +} + +"""An input for mutations affecting `OrgMemberProfile`""" +input OrgMemberProfileInput { + id: UUID + createdAt: Datetime + updatedAt: Datetime + + """References the membership this profile belongs to (1:1)""" + membershipId: UUID! + + """References the entity this profile belongs to (used for RLS lookups)""" + entityId: UUID! + + """References the user who owns this profile (for self-edit RLS)""" + actorId: UUID! + + """Display name shown to other entity members""" + displayName: String + + """ + Email address visible to other entity members (auto-populated from verified primary email) + """ + email: String + + """Job title or role description visible to other entity members""" + title: String + + """Short biography visible to other entity members""" + bio: String + + """Profile picture visible to other entity members""" + profilePicture: ConstructiveInternalTypeImage +} + """The output of our create `SqlAction` mutation.""" type CreateSqlActionPayload { """ @@ -29059,6 +30636,60 @@ input UniqueConstraintInput { updatedAt: Datetime } +"""The output of our create `SpatialRelation` mutation.""" +type CreateSpatialRelationPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `SpatialRelation` that was created by this mutation.""" + spatialRelation: SpatialRelation + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SpatialRelation`. May be used by Relay 1.""" + spatialRelationEdge( + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!]! = [PRIMARY_KEY_ASC] + ): SpatialRelationEdge +} + +"""All input for the create `SpatialRelation` mutation.""" +input CreateSpatialRelationInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `SpatialRelation` to be created by this mutation.""" + spatialRelation: SpatialRelationInput! +} + +"""An input for mutations affecting `SpatialRelation`""" +input SpatialRelationInput { + id: UUID + databaseId: UUID + tableId: UUID! + fieldId: UUID! + refTableId: UUID! + refFieldId: UUID! + name: String! + operator: String! + paramName: String + category: ObjectCategory + module: String + scope: Int + tags: [String] + createdAt: Datetime + updatedAt: Datetime +} + """The output of our create `Policy` mutation.""" type CreatePolicyPayload { """ @@ -29115,6 +30746,189 @@ input PolicyInput { updatedAt: Datetime } +"""The output of our create `EntityTypeProvision` mutation.""" +type CreateEntityTypeProvisionPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `EntityTypeProvision` that was created by this mutation.""" + entityTypeProvision: EntityTypeProvision + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `EntityTypeProvision`. May be used by Relay 1.""" + entityTypeProvisionEdge( + """The method to use when ordering `EntityTypeProvision`.""" + orderBy: [EntityTypeProvisionOrderBy!]! = [PRIMARY_KEY_ASC] + ): EntityTypeProvisionEdge +} + +"""All input for the create `EntityTypeProvision` mutation.""" +input CreateEntityTypeProvisionInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `EntityTypeProvision` to be created by this mutation.""" + entityTypeProvision: EntityTypeProvisionInput! +} + +"""An input for mutations affecting `EntityTypeProvision`""" +input EntityTypeProvisionInput { + """Unique identifier for this provision row.""" + id: UUID + + """The database to provision this entity type in. Required.""" + databaseId: UUID! + + """ + Human-readable name for this membership type, e.g. 'Data Room Member', 'Team Channel Member'. Required. + Stored in the membership_types registry table. + """ + name: String! + + """ + SQL prefix used for table and module naming, e.g. 'data_room', 'team_channel'. Required. + Drives entity table name (prefix || 's' by default), module labels (permissions_module:prefix), + and membership table names (prefix_memberships, prefix_members, etc.). + Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING. + """ + prefix: String! + + """ + Description of this membership type. Stored in the membership_types registry table. Defaults to empty string. + """ + description: String + + """ + Prefix of the parent entity type. The trigger resolves this to a membership_type integer + by looking up memberships_module WHERE prefix = parent_entity. + Defaults to 'org' (the organization-level type). For nested types, set to the parent's prefix + (e.g. 'data_room' for a team_channel nested under data_room). + The parent type must already be provisioned before this INSERT. + """ + parentEntity: String + + """ + Override the entity table name. When NULL (default), the table name is derived as prefix || 's' + (e.g. prefix 'data_room' produces table 'data_rooms'). + Set this when the pluralization rule doesn't apply (e.g. prefix 'staff' should produce 'staff' not 'staffs'). + """ + tableName: String + + """ + Whether members of the parent entity can see child entities. Defaults to true. + When true: a SELECT policy allows parent members to list child entities (e.g. org members can see all data rooms). + When false: only direct members of the entity itself can see it (private entity mode). + Controls whether the parent_member SELECT policy is created on the entity table. + Only meaningful on the defaults path — ignored (no-op) when table_provision is non-NULL or + skip_entity_policies=true, since no default policies are being applied in those cases. + """ + isVisible: Boolean + + """ + Whether to apply limits_module security for this type. Defaults to false. + The limits_module table structure is always created (memberships_module requires it), + but when false, no RLS policies are applied to the limits tables. + Set to true if this entity type needs configurable resource limits per membership. + """ + hasLimits: Boolean + + """ + Whether to provision profiles_module for this type. Defaults to false. + Profiles provide named permission roles (e.g. 'Editor', 'Viewer') with pre-configured permission bitmasks. + When true, creates profile tables and applies profiles security. + """ + hasProfiles: Boolean + + """ + Whether to provision levels_module for this type. Defaults to false. + Levels provide gamification/achievement tracking for members. + When true, creates level steps, achievements, and level tables with security. + """ + hasLevels: Boolean + + """ + Escape hatch: when true, apply zero RLS policies to the entity table. Defaults to false. + Use this only when you want the entity table provisioned with zero policies (e.g. because you + plan to insert secure_table_provision rows yourself later). In most cases, prefer leaving this + false and either accepting the five defaults (table_provision=NULL) or overriding them via + table_provision. + Defaults (applied when table_provision IS NULL and skip_entity_policies=false): + - SELECT (parent_member): parent entity members can see child entities (only when is_visible=true) + - SELECT (self_member): direct members of the entity can see it + - INSERT: create_entity permission on the parent entity + - UPDATE: admin_entity permission on the entity itself + - DELETE: owner of the entity can delete it + """ + skipEntityPolicies: Boolean + + """ + Single jsonb object describing the full security setup to apply to the entity table. + Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + entries, so an entity table is configured the same way an ordinary blueprint table is. + Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by + table_provision.policies[] (is_visible becomes a no-op on this path). + Recognized keys (all optional): + - use_rls (boolean, default true) + - nodes (jsonb array of {"$type","data"} Data* module entries) + - fields (jsonb array of field objects: name,type,is_required,default,min,max,regexp,index) + - grant_privileges (jsonb array of [privilege, columns] tuples) + - grant_roles (jsonb array of role names; defaults to ["authenticated"]) + - policies (jsonb array of policy objects; each with $type, privileges, data, name, role, permissive) + The trigger fans policies[] into N secure_table_provision rows against the newly created entity table, + with table-level setup (nodes/fields/grants) attached to the first row. + Example — override with two SELECT policies: + table_provision := jsonb_build_object( + 'policies', jsonb_build_array( + jsonb_build_object( + '$type', 'AuthzEntityMembership', + 'privileges', jsonb_build_array('select'), + 'data', jsonb_build_object('entity_field', 'id', 'membership_type', 3), + 'name', 'self_member' + ), + jsonb_build_object( + '$type', 'AuthzDirectOwner', + 'privileges', jsonb_build_array('select', 'update'), + 'data', jsonb_build_object('owner_field', 'owner_id') + ) + ) + ) + """ + tableProvision: JSON + + """ + Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning. + This is the ID used in membership_types, memberships_module, and all module tables. + """ + outMembershipType: Int + + """ + Output: the UUID of the created entity table. Populated by the trigger. + Use this to reference the entity table in subsequent relation_provision or secure_table_provision rows. + """ + outEntityTableId: UUID + + """ + Output: the name of the created entity table (e.g. 'data_rooms'). Populated by the trigger. + """ + outEntityTableName: String + + """ + Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + Populated by the trigger. Useful for verifying which modules were provisioned. + """ + outInstalledModules: [String] +} + """The output of our create `PermissionsModule` mutation.""" type CreatePermissionsModulePayload { """ @@ -29240,168 +31054,6 @@ input AppInviteInput { updatedAt: Datetime } -"""The output of our create `AppMembership` mutation.""" -type CreateAppMembershipPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `AppMembership` that was created by this mutation.""" - appMembership: AppMembership - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `AppMembership`. May be used by Relay 1.""" - appMembershipEdge( - """The method to use when ordering `AppMembership`.""" - orderBy: [AppMembershipOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppMembershipEdge -} - -"""All input for the create `AppMembership` mutation.""" -input CreateAppMembershipInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `AppMembership` to be created by this mutation.""" - appMembership: AppMembershipInput! -} - -"""An input for mutations affecting `AppMembership`""" -input AppMembershipInput { - id: UUID - createdAt: Datetime - updatedAt: Datetime - createdBy: UUID - updatedBy: UUID - - """Whether this membership has been approved by an admin""" - isApproved: Boolean - - """Whether this member has been banned from the entity""" - isBanned: Boolean - - """Whether this membership is temporarily disabled""" - isDisabled: Boolean - - """Whether this member has been verified (e.g. email confirmation)""" - isVerified: Boolean - - """ - Computed field indicating the membership is approved, verified, not banned, and not disabled - """ - isActive: Boolean - - """Whether the actor is the owner of this entity""" - isOwner: Boolean - - """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean - - """ - Aggregated permission bitmask combining profile-based and directly granted permissions - """ - permissions: BitString - - """ - Bitmask of permissions directly granted to this member (not from profiles) - """ - granted: BitString - - """References the user who holds this membership""" - actorId: UUID! - profileId: UUID -} - -"""The output of our create `OrgMembership` mutation.""" -type CreateOrgMembershipPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `OrgMembership` that was created by this mutation.""" - orgMembership: OrgMembership - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `OrgMembership`. May be used by Relay 1.""" - orgMembershipEdge( - """The method to use when ordering `OrgMembership`.""" - orderBy: [OrgMembershipOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgMembershipEdge -} - -"""All input for the create `OrgMembership` mutation.""" -input CreateOrgMembershipInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """The `OrgMembership` to be created by this mutation.""" - orgMembership: OrgMembershipInput! -} - -"""An input for mutations affecting `OrgMembership`""" -input OrgMembershipInput { - id: UUID - createdAt: Datetime - updatedAt: Datetime - createdBy: UUID - updatedBy: UUID - - """Whether this membership has been approved by an admin""" - isApproved: Boolean - - """Whether this member has been banned from the entity""" - isBanned: Boolean - - """Whether this membership is temporarily disabled""" - isDisabled: Boolean - - """ - Computed field indicating the membership is approved, verified, not banned, and not disabled - """ - isActive: Boolean - - """Whether the actor is the owner of this entity""" - isOwner: Boolean - - """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean - - """ - Aggregated permission bitmask combining profile-based and directly granted permissions - """ - permissions: BitString - - """ - Bitmask of permissions directly granted to this member (not from profiles) - """ - granted: BitString - - """References the user who holds this membership""" - actorId: UUID! - - """References the entity (org or group) this membership belongs to""" - entityId: UUID! - profileId: UUID -} - """The output of our create `EmbeddingChunk` mutation.""" type CreateEmbeddingChunkPayload { """ @@ -29626,6 +31278,92 @@ input ProfilesModuleInput { prefix: String } +"""The output of our create `AppMembership` mutation.""" +type CreateAppMembershipPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `AppMembership` that was created by this mutation.""" + appMembership: AppMembership + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `AppMembership`. May be used by Relay 1.""" + appMembershipEdge( + """The method to use when ordering `AppMembership`.""" + orderBy: [AppMembershipOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppMembershipEdge +} + +"""All input for the create `AppMembership` mutation.""" +input CreateAppMembershipInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `AppMembership` to be created by this mutation.""" + appMembership: AppMembershipInput! +} + +"""An input for mutations affecting `AppMembership`""" +input AppMembershipInput { + id: UUID + createdAt: Datetime + updatedAt: Datetime + createdBy: UUID + updatedBy: UUID + + """Whether this membership has been approved by an admin""" + isApproved: Boolean + + """Whether this member has been banned from the entity""" + isBanned: Boolean + + """Whether this membership is temporarily disabled""" + isDisabled: Boolean + + """Whether this member has been verified (e.g. email confirmation)""" + isVerified: Boolean + + """ + Computed field indicating the membership is approved, verified, not banned, and not disabled + """ + isActive: Boolean + + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean + + """Whether the actor is the owner of this entity""" + isOwner: Boolean + + """Whether the actor has admin privileges on this entity""" + isAdmin: Boolean + + """ + Aggregated permission bitmask combining profile-based and directly granted permissions + """ + permissions: BitString + + """ + Bitmask of permissions directly granted to this member (not from profiles) + """ + granted: BitString + + """References the user who holds this membership""" + actorId: UUID! + profileId: UUID +} + """The output of our create `Index` mutation.""" type CreateIndexPayload { """ @@ -29876,6 +31614,95 @@ input SecureTableProvisionInput { outFields: [UUID] } +"""The output of our create `OrgMembership` mutation.""" +type CreateOrgMembershipPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgMembership` that was created by this mutation.""" + orgMembership: OrgMembership + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `OrgMembership`. May be used by Relay 1.""" + orgMembershipEdge( + """The method to use when ordering `OrgMembership`.""" + orderBy: [OrgMembershipOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipEdge +} + +"""All input for the create `OrgMembership` mutation.""" +input CreateOrgMembershipInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """The `OrgMembership` to be created by this mutation.""" + orgMembership: OrgMembershipInput! +} + +"""An input for mutations affecting `OrgMembership`""" +input OrgMembershipInput { + id: UUID + createdAt: Datetime + updatedAt: Datetime + createdBy: UUID + updatedBy: UUID + + """Whether this membership has been approved by an admin""" + isApproved: Boolean + + """Whether this member has been banned from the entity""" + isBanned: Boolean + + """Whether this membership is temporarily disabled""" + isDisabled: Boolean + + """ + Computed field indicating the membership is approved, verified, not banned, and not disabled + """ + isActive: Boolean + + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean + + """Whether the actor is the owner of this entity""" + isOwner: Boolean + + """Whether the actor has admin privileges on this entity""" + isAdmin: Boolean + + """ + Aggregated permission bitmask combining profile-based and directly granted permissions + """ + permissions: BitString + + """ + Bitmask of permissions directly granted to this member (not from profiles) + """ + granted: BitString + + """References the user who holds this membership""" + actorId: UUID! + + """References the entity (org or group) this membership belongs to""" + entityId: UUID! + + """Whether this member has read-only access (blocks mutations when true)""" + isReadOnly: Boolean + profileId: UUID +} + """The output of our create `BlueprintTemplate` mutation.""" type CreateBlueprintTemplatePayload { """ @@ -30358,8 +32185,8 @@ input UserAuthModuleInput { checkPasswordFunction: String sendAccountDeletionEmailFunction: String deleteAccountFunction: String - signInOneTimeTokenFunction: String - oneTimeTokenFunction: String + signInCrossOriginFunction: String + requestCrossOriginTokenFunction: String extendTokenExpires: String } @@ -30734,6 +32561,7 @@ input MembershipsModuleInput { entityIdsByMask: String entityIdsByPerm: String entityIdsFunction: String + memberProfilesTableId: UUID } """The output of our update `DefaultIdsModule` mutation.""" @@ -31677,6 +33505,60 @@ input ViewRulePatch { action: String } +"""The output of our update `SessionSecretsModule` mutation.""" +type UpdateSessionSecretsModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `SessionSecretsModule` that was updated by this mutation.""" + sessionSecretsModule: SessionSecretsModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SessionSecretsModule`. May be used by Relay 1.""" + sessionSecretsModuleEdge( + """The method to use when ordering `SessionSecretsModule`.""" + orderBy: [SessionSecretsModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): SessionSecretsModuleEdge +} + +"""All input for the `updateSessionSecretsModule` mutation.""" +input UpdateSessionSecretsModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `SessionSecretsModule` being updated. + """ + sessionSecretsModulePatch: SessionSecretsModulePatch! +} + +""" +Represents an update to a `SessionSecretsModule`. Fields that are set will be updated. +""" +input SessionSecretsModulePatch { + id: UUID + databaseId: UUID + schemaId: UUID + tableId: UUID + tableName: String + + """ + Resolved reference to sessions_module.sessions_table, used to FK session_secrets.session_id with ON DELETE CASCADE. + """ + sessionsTableId: UUID +} + """The output of our update `AppAdminGrant` mutation.""" type UpdateAppAdminGrantPayload { """ @@ -32104,6 +33986,57 @@ input ConnectedAccountsModulePatch { tableName: String } +"""The output of our update `DevicesModule` mutation.""" +type UpdateDevicesModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `DevicesModule` that was updated by this mutation.""" + devicesModule: DevicesModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `DevicesModule`. May be used by Relay 1.""" + devicesModuleEdge( + """The method to use when ordering `DevicesModule`.""" + orderBy: [DevicesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): DevicesModuleEdge +} + +"""All input for the `updateDevicesModule` mutation.""" +input UpdateDevicesModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `DevicesModule` being updated. + """ + devicesModulePatch: DevicesModulePatch! +} + +""" +Represents an update to a `DevicesModule`. Fields that are set will be updated. +""" +input DevicesModulePatch { + id: UUID + databaseId: UUID + schemaId: UUID + userDevicesTableId: UUID + deviceSettingsTableId: UUID + userDevicesTable: String + deviceSettingsTable: String +} + """The output of our update `EmailsModule` mutation.""" type UpdateEmailsModulePayload { """ @@ -32257,6 +34190,61 @@ input UsersModulePatch { typeTableName: String } +"""The output of our update `WebauthnCredentialsModule` mutation.""" +type UpdateWebauthnCredentialsModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `WebauthnCredentialsModule` that was updated by this mutation.""" + webauthnCredentialsModule: WebauthnCredentialsModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `WebauthnCredentialsModule`. May be used by Relay 1.""" + webauthnCredentialsModuleEdge( + """The method to use when ordering `WebauthnCredentialsModule`.""" + orderBy: [WebauthnCredentialsModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): WebauthnCredentialsModuleEdge +} + +"""All input for the `updateWebauthnCredentialsModule` mutation.""" +input UpdateWebauthnCredentialsModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `WebauthnCredentialsModule` being updated. + """ + webauthnCredentialsModulePatch: WebauthnCredentialsModulePatch! +} + +""" +Represents an update to a `WebauthnCredentialsModule`. Fields that are set will be updated. +""" +input WebauthnCredentialsModulePatch { + id: UUID + databaseId: UUID + schemaId: UUID + + """ + Reserved for future SECURITY DEFINER helpers on webauthn_credentials; unused in Phase 11a. + """ + privateSchemaId: UUID + tableId: UUID + ownerTableId: UUID + tableName: String +} + """The output of our update `OrgAdminGrant` mutation.""" type UpdateOrgAdminGrantPayload { """ @@ -32430,69 +34418,6 @@ input CryptoAddressPatch { updatedAt: Datetime } -"""The output of our update `MembershipType` mutation.""" -type UpdateMembershipTypePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `MembershipType` that was updated by this mutation.""" - membershipType: MembershipType - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `MembershipType`. May be used by Relay 1.""" - membershipTypeEdge( - """The method to use when ordering `MembershipType`.""" - orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] - ): MembershipTypeEdge -} - -"""All input for the `updateMembershipType` mutation.""" -input UpdateMembershipTypeInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) - """ - id: Int! - - """ - An object where the defined keys will be set on the `MembershipType` being updated. - """ - membershipTypePatch: MembershipTypePatch! -} - -""" -Represents an update to a `MembershipType`. Fields that are set will be updated. -""" -input MembershipTypePatch { - """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) - """ - id: Int - - """Human-readable name of the membership type""" - name: String - - """Description of what this membership type represents""" - description: String - - """ - Short prefix used to namespace tables and functions for this membership scope - """ - prefix: String -} - """The output of our update `Object` mutation.""" type UpdateObjectPayload { """ @@ -32649,66 +34574,6 @@ input CryptoAddressesModulePatch { cryptoNetwork: String } -"""The output of our update `ConnectedAccount` mutation.""" -type UpdateConnectedAccountPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `ConnectedAccount` that was updated by this mutation.""" - connectedAccount: ConnectedAccount - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `ConnectedAccount`. May be used by Relay 1.""" - connectedAccountEdge( - """The method to use when ordering `ConnectedAccount`.""" - orderBy: [ConnectedAccountOrderBy!]! = [PRIMARY_KEY_ASC] - ): ConnectedAccountEdge -} - -"""All input for the `updateConnectedAccount` mutation.""" -input UpdateConnectedAccountInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `ConnectedAccount` being updated. - """ - connectedAccountPatch: ConnectedAccountPatch! -} - -""" -Represents an update to a `ConnectedAccount`. Fields that are set will be updated. -""" -input ConnectedAccountPatch { - id: UUID - ownerId: UUID - - """The service used, e.g. `twitter` or `github`.""" - service: String - - """A unique identifier for the user within the service""" - identifier: String - - """Additional profile details extracted from this login method""" - details: JSON - - """Whether this connected account has been verified""" - isVerified: Boolean - createdAt: Datetime - updatedAt: Datetime -} - """The output of our update `PhoneNumber` mutation.""" type UpdatePhoneNumberPayload { """ @@ -33466,59 +35331,6 @@ input RateLimitsModulePatch { rateLimitsTable: String } -"""The output of our update `TableTemplateModule` mutation.""" -type UpdateTableTemplateModulePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `TableTemplateModule` that was updated by this mutation.""" - tableTemplateModule: TableTemplateModule - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `TableTemplateModule`. May be used by Relay 1.""" - tableTemplateModuleEdge( - """The method to use when ordering `TableTemplateModule`.""" - orderBy: [TableTemplateModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): TableTemplateModuleEdge -} - -"""All input for the `updateTableTemplateModule` mutation.""" -input UpdateTableTemplateModuleInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `TableTemplateModule` being updated. - """ - tableTemplateModulePatch: TableTemplateModulePatch! -} - -""" -Represents an update to a `TableTemplateModule`. Fields that are set will be updated. -""" -input TableTemplateModulePatch { - id: UUID - databaseId: UUID - schemaId: UUID - privateSchemaId: UUID - tableId: UUID - ownerTableId: UUID - tableName: String - nodeType: String - data: JSON -} - """The output of our update `OrgChartEdgeGrant` mutation.""" type UpdateOrgChartEdgeGrantPayload { """ @@ -33648,6 +35460,79 @@ input OrgLimitPatch { entityId: UUID } +"""The output of our update `MembershipType` mutation.""" +type UpdateMembershipTypePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `MembershipType` that was updated by this mutation.""" + membershipType: MembershipType + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `MembershipType`. May be used by Relay 1.""" + membershipTypeEdge( + """The method to use when ordering `MembershipType`.""" + orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): MembershipTypeEdge +} + +"""All input for the `updateMembershipType` mutation.""" +input UpdateMembershipTypeInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int! + + """ + An object where the defined keys will be set on the `MembershipType` being updated. + """ + membershipTypePatch: MembershipTypePatch! +} + +""" +Represents an update to a `MembershipType`. Fields that are set will be updated. +""" +input MembershipTypePatch { + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int + + """Human-readable name of the membership type""" + name: String + + """Description of what this membership type represents""" + description: String + + """ + Short prefix used to namespace tables and functions for this membership scope + """ + prefix: String + + """ + Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) + """ + parentMembershipType: Int + + """ + When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs + """ + hasUsersTableEntry: Boolean +} + """The output of our update `Domain` mutation.""" type UpdateDomainPayload { """ @@ -34610,6 +36495,82 @@ input DenormalizedTableFieldPatch { funcOrder: Int } +"""The output of our update `OrgMemberProfile` mutation.""" +type UpdateOrgMemberProfilePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgMemberProfile` that was updated by this mutation.""" + orgMemberProfile: OrgMemberProfile + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `OrgMemberProfile`. May be used by Relay 1.""" + orgMemberProfileEdge( + """The method to use when ordering `OrgMemberProfile`.""" + orderBy: [OrgMemberProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMemberProfileEdge +} + +"""All input for the `updateOrgMemberProfile` mutation.""" +input UpdateOrgMemberProfileInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `OrgMemberProfile` being updated. + """ + orgMemberProfilePatch: OrgMemberProfilePatch! +} + +""" +Represents an update to a `OrgMemberProfile`. Fields that are set will be updated. +""" +input OrgMemberProfilePatch { + id: UUID + createdAt: Datetime + updatedAt: Datetime + + """References the membership this profile belongs to (1:1)""" + membershipId: UUID + + """References the entity this profile belongs to (used for RLS lookups)""" + entityId: UUID + + """References the user who owns this profile (for self-edit RLS)""" + actorId: UUID + + """Display name shown to other entity members""" + displayName: String + + """ + Email address visible to other entity members (auto-populated from verified primary email) + """ + email: String + + """Job title or role description visible to other entity members""" + title: String + + """Short biography visible to other entity members""" + bio: String + + """Profile picture visible to other entity members""" + profilePicture: ConstructiveInternalTypeImage + + """Upload for Profile picture visible to other entity members""" + profilePictureUpload: Upload +} + """The output of our update `DatabaseTransfer` mutation.""" type UpdateDatabaseTransferPayload { """ @@ -35415,6 +37376,65 @@ input UniqueConstraintPatch { updatedAt: Datetime } +"""The output of our update `SpatialRelation` mutation.""" +type UpdateSpatialRelationPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `SpatialRelation` that was updated by this mutation.""" + spatialRelation: SpatialRelation + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SpatialRelation`. May be used by Relay 1.""" + spatialRelationEdge( + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!]! = [PRIMARY_KEY_ASC] + ): SpatialRelationEdge +} + +"""All input for the `updateSpatialRelation` mutation.""" +input UpdateSpatialRelationInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `SpatialRelation` being updated. + """ + spatialRelationPatch: SpatialRelationPatch! +} + +""" +Represents an update to a `SpatialRelation`. Fields that are set will be updated. +""" +input SpatialRelationPatch { + id: UUID + databaseId: UUID + tableId: UUID + fieldId: UUID + refTableId: UUID + refFieldId: UUID + name: String + operator: String + paramName: String + category: ObjectCategory + module: String + scope: Int + tags: [String] + createdAt: Datetime + updatedAt: Datetime +} + """The output of our update `Policy` mutation.""" type UpdatePolicyPayload { """ @@ -35476,6 +37496,196 @@ input PolicyPatch { updatedAt: Datetime } +"""The output of our update `EntityTypeProvision` mutation.""" +type UpdateEntityTypeProvisionPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `EntityTypeProvision` that was updated by this mutation.""" + entityTypeProvision: EntityTypeProvision + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `EntityTypeProvision`. May be used by Relay 1.""" + entityTypeProvisionEdge( + """The method to use when ordering `EntityTypeProvision`.""" + orderBy: [EntityTypeProvisionOrderBy!]! = [PRIMARY_KEY_ASC] + ): EntityTypeProvisionEdge +} + +"""All input for the `updateEntityTypeProvision` mutation.""" +input UpdateEntityTypeProvisionInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Unique identifier for this provision row.""" + id: UUID! + + """ + An object where the defined keys will be set on the `EntityTypeProvision` being updated. + """ + entityTypeProvisionPatch: EntityTypeProvisionPatch! +} + +""" +Represents an update to a `EntityTypeProvision`. Fields that are set will be updated. +""" +input EntityTypeProvisionPatch { + """Unique identifier for this provision row.""" + id: UUID + + """The database to provision this entity type in. Required.""" + databaseId: UUID + + """ + Human-readable name for this membership type, e.g. 'Data Room Member', 'Team Channel Member'. Required. + Stored in the membership_types registry table. + """ + name: String + + """ + SQL prefix used for table and module naming, e.g. 'data_room', 'team_channel'. Required. + Drives entity table name (prefix || 's' by default), module labels (permissions_module:prefix), + and membership table names (prefix_memberships, prefix_members, etc.). + Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING. + """ + prefix: String + + """ + Description of this membership type. Stored in the membership_types registry table. Defaults to empty string. + """ + description: String + + """ + Prefix of the parent entity type. The trigger resolves this to a membership_type integer + by looking up memberships_module WHERE prefix = parent_entity. + Defaults to 'org' (the organization-level type). For nested types, set to the parent's prefix + (e.g. 'data_room' for a team_channel nested under data_room). + The parent type must already be provisioned before this INSERT. + """ + parentEntity: String + + """ + Override the entity table name. When NULL (default), the table name is derived as prefix || 's' + (e.g. prefix 'data_room' produces table 'data_rooms'). + Set this when the pluralization rule doesn't apply (e.g. prefix 'staff' should produce 'staff' not 'staffs'). + """ + tableName: String + + """ + Whether members of the parent entity can see child entities. Defaults to true. + When true: a SELECT policy allows parent members to list child entities (e.g. org members can see all data rooms). + When false: only direct members of the entity itself can see it (private entity mode). + Controls whether the parent_member SELECT policy is created on the entity table. + Only meaningful on the defaults path — ignored (no-op) when table_provision is non-NULL or + skip_entity_policies=true, since no default policies are being applied in those cases. + """ + isVisible: Boolean + + """ + Whether to apply limits_module security for this type. Defaults to false. + The limits_module table structure is always created (memberships_module requires it), + but when false, no RLS policies are applied to the limits tables. + Set to true if this entity type needs configurable resource limits per membership. + """ + hasLimits: Boolean + + """ + Whether to provision profiles_module for this type. Defaults to false. + Profiles provide named permission roles (e.g. 'Editor', 'Viewer') with pre-configured permission bitmasks. + When true, creates profile tables and applies profiles security. + """ + hasProfiles: Boolean + + """ + Whether to provision levels_module for this type. Defaults to false. + Levels provide gamification/achievement tracking for members. + When true, creates level steps, achievements, and level tables with security. + """ + hasLevels: Boolean + + """ + Escape hatch: when true, apply zero RLS policies to the entity table. Defaults to false. + Use this only when you want the entity table provisioned with zero policies (e.g. because you + plan to insert secure_table_provision rows yourself later). In most cases, prefer leaving this + false and either accepting the five defaults (table_provision=NULL) or overriding them via + table_provision. + Defaults (applied when table_provision IS NULL and skip_entity_policies=false): + - SELECT (parent_member): parent entity members can see child entities (only when is_visible=true) + - SELECT (self_member): direct members of the entity can see it + - INSERT: create_entity permission on the parent entity + - UPDATE: admin_entity permission on the entity itself + - DELETE: owner of the entity can delete it + """ + skipEntityPolicies: Boolean + + """ + Single jsonb object describing the full security setup to apply to the entity table. + Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + entries, so an entity table is configured the same way an ordinary blueprint table is. + Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by + table_provision.policies[] (is_visible becomes a no-op on this path). + Recognized keys (all optional): + - use_rls (boolean, default true) + - nodes (jsonb array of {"$type","data"} Data* module entries) + - fields (jsonb array of field objects: name,type,is_required,default,min,max,regexp,index) + - grant_privileges (jsonb array of [privilege, columns] tuples) + - grant_roles (jsonb array of role names; defaults to ["authenticated"]) + - policies (jsonb array of policy objects; each with $type, privileges, data, name, role, permissive) + The trigger fans policies[] into N secure_table_provision rows against the newly created entity table, + with table-level setup (nodes/fields/grants) attached to the first row. + Example — override with two SELECT policies: + table_provision := jsonb_build_object( + 'policies', jsonb_build_array( + jsonb_build_object( + '$type', 'AuthzEntityMembership', + 'privileges', jsonb_build_array('select'), + 'data', jsonb_build_object('entity_field', 'id', 'membership_type', 3), + 'name', 'self_member' + ), + jsonb_build_object( + '$type', 'AuthzDirectOwner', + 'privileges', jsonb_build_array('select', 'update'), + 'data', jsonb_build_object('owner_field', 'owner_id') + ) + ) + ) + """ + tableProvision: JSON + + """ + Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning. + This is the ID used in membership_types, memberships_module, and all module tables. + """ + outMembershipType: Int + + """ + Output: the UUID of the created entity table. Populated by the trigger. + Use this to reference the entity table in subsequent relation_provision or secure_table_provision rows. + """ + outEntityTableId: UUID + + """ + Output: the name of the created entity table (e.g. 'data_rooms'). Populated by the trigger. + """ + outEntityTableName: String + + """ + Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + Populated by the trigger. Useful for verifying which modules were provisioned. + """ + outInstalledModules: [String] +} + """The output of our update `PermissionsModule` mutation.""" type UpdatePermissionsModulePayload { """ @@ -35611,178 +37821,6 @@ input AppInvitePatch { updatedAt: Datetime } -"""The output of our update `AppMembership` mutation.""" -type UpdateAppMembershipPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `AppMembership` that was updated by this mutation.""" - appMembership: AppMembership - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `AppMembership`. May be used by Relay 1.""" - appMembershipEdge( - """The method to use when ordering `AppMembership`.""" - orderBy: [AppMembershipOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppMembershipEdge -} - -"""All input for the `updateAppMembership` mutation.""" -input UpdateAppMembershipInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `AppMembership` being updated. - """ - appMembershipPatch: AppMembershipPatch! -} - -""" -Represents an update to a `AppMembership`. Fields that are set will be updated. -""" -input AppMembershipPatch { - id: UUID - createdAt: Datetime - updatedAt: Datetime - createdBy: UUID - updatedBy: UUID - - """Whether this membership has been approved by an admin""" - isApproved: Boolean - - """Whether this member has been banned from the entity""" - isBanned: Boolean - - """Whether this membership is temporarily disabled""" - isDisabled: Boolean - - """Whether this member has been verified (e.g. email confirmation)""" - isVerified: Boolean - - """ - Computed field indicating the membership is approved, verified, not banned, and not disabled - """ - isActive: Boolean - - """Whether the actor is the owner of this entity""" - isOwner: Boolean - - """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean - - """ - Aggregated permission bitmask combining profile-based and directly granted permissions - """ - permissions: BitString - - """ - Bitmask of permissions directly granted to this member (not from profiles) - """ - granted: BitString - - """References the user who holds this membership""" - actorId: UUID - profileId: UUID -} - -"""The output of our update `OrgMembership` mutation.""" -type UpdateOrgMembershipPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `OrgMembership` that was updated by this mutation.""" - orgMembership: OrgMembership - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `OrgMembership`. May be used by Relay 1.""" - orgMembershipEdge( - """The method to use when ordering `OrgMembership`.""" - orderBy: [OrgMembershipOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgMembershipEdge -} - -"""All input for the `updateOrgMembership` mutation.""" -input UpdateOrgMembershipInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! - - """ - An object where the defined keys will be set on the `OrgMembership` being updated. - """ - orgMembershipPatch: OrgMembershipPatch! -} - -""" -Represents an update to a `OrgMembership`. Fields that are set will be updated. -""" -input OrgMembershipPatch { - id: UUID - createdAt: Datetime - updatedAt: Datetime - createdBy: UUID - updatedBy: UUID - - """Whether this membership has been approved by an admin""" - isApproved: Boolean - - """Whether this member has been banned from the entity""" - isBanned: Boolean - - """Whether this membership is temporarily disabled""" - isDisabled: Boolean - - """ - Computed field indicating the membership is approved, verified, not banned, and not disabled - """ - isActive: Boolean - - """Whether the actor is the owner of this entity""" - isOwner: Boolean - - """Whether the actor has admin privileges on this entity""" - isAdmin: Boolean - - """ - Aggregated permission bitmask combining profile-based and directly granted permissions - """ - permissions: BitString - - """ - Bitmask of permissions directly granted to this member (not from profiles) - """ - granted: BitString - - """References the user who holds this membership""" - actorId: UUID - - """References the entity (org or group) this membership belongs to""" - entityId: UUID - profileId: UUID -} - """The output of our update `EmbeddingChunk` mutation.""" type UpdateEmbeddingChunkPayload { """ @@ -36027,6 +38065,97 @@ input ProfilesModulePatch { prefix: String } +"""The output of our update `AppMembership` mutation.""" +type UpdateAppMembershipPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `AppMembership` that was updated by this mutation.""" + appMembership: AppMembership + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `AppMembership`. May be used by Relay 1.""" + appMembershipEdge( + """The method to use when ordering `AppMembership`.""" + orderBy: [AppMembershipOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppMembershipEdge +} + +"""All input for the `updateAppMembership` mutation.""" +input UpdateAppMembershipInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `AppMembership` being updated. + """ + appMembershipPatch: AppMembershipPatch! +} + +""" +Represents an update to a `AppMembership`. Fields that are set will be updated. +""" +input AppMembershipPatch { + id: UUID + createdAt: Datetime + updatedAt: Datetime + createdBy: UUID + updatedBy: UUID + + """Whether this membership has been approved by an admin""" + isApproved: Boolean + + """Whether this member has been banned from the entity""" + isBanned: Boolean + + """Whether this membership is temporarily disabled""" + isDisabled: Boolean + + """Whether this member has been verified (e.g. email confirmation)""" + isVerified: Boolean + + """ + Computed field indicating the membership is approved, verified, not banned, and not disabled + """ + isActive: Boolean + + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean + + """Whether the actor is the owner of this entity""" + isOwner: Boolean + + """Whether the actor has admin privileges on this entity""" + isAdmin: Boolean + + """ + Aggregated permission bitmask combining profile-based and directly granted permissions + """ + permissions: BitString + + """ + Bitmask of permissions directly granted to this member (not from profiles) + """ + granted: BitString + + """References the user who holds this membership""" + actorId: UUID + profileId: UUID +} + """The output of our update `Index` mutation.""" type UpdateIndexPayload { """ @@ -36294,6 +38423,100 @@ input SecureTableProvisionPatch { outFields: [UUID] } +"""The output of our update `OrgMembership` mutation.""" +type UpdateOrgMembershipPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgMembership` that was updated by this mutation.""" + orgMembership: OrgMembership + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `OrgMembership`. May be used by Relay 1.""" + orgMembershipEdge( + """The method to use when ordering `OrgMembership`.""" + orderBy: [OrgMembershipOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipEdge +} + +"""All input for the `updateOrgMembership` mutation.""" +input UpdateOrgMembershipInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! + + """ + An object where the defined keys will be set on the `OrgMembership` being updated. + """ + orgMembershipPatch: OrgMembershipPatch! +} + +""" +Represents an update to a `OrgMembership`. Fields that are set will be updated. +""" +input OrgMembershipPatch { + id: UUID + createdAt: Datetime + updatedAt: Datetime + createdBy: UUID + updatedBy: UUID + + """Whether this membership has been approved by an admin""" + isApproved: Boolean + + """Whether this member has been banned from the entity""" + isBanned: Boolean + + """Whether this membership is temporarily disabled""" + isDisabled: Boolean + + """ + Computed field indicating the membership is approved, verified, not banned, and not disabled + """ + isActive: Boolean + + """ + Whether this member is external (not a member of the parent scope). External members may have restricted permissions. + """ + isExternal: Boolean + + """Whether the actor is the owner of this entity""" + isOwner: Boolean + + """Whether the actor has admin privileges on this entity""" + isAdmin: Boolean + + """ + Aggregated permission bitmask combining profile-based and directly granted permissions + """ + permissions: BitString + + """ + Bitmask of permissions directly granted to this member (not from profiles) + """ + granted: BitString + + """References the user who holds this membership""" + actorId: UUID + + """References the entity (org or group) this membership belongs to""" + entityId: UUID + + """Whether this member has read-only access (blocks mutations when true)""" + isReadOnly: Boolean + profileId: UUID +} + """The output of our update `BlueprintTemplate` mutation.""" type UpdateBlueprintTemplatePayload { """ @@ -36813,8 +39036,8 @@ input UserAuthModulePatch { checkPasswordFunction: String sendAccountDeletionEmailFunction: String deleteAccountFunction: String - signInOneTimeTokenFunction: String - oneTimeTokenFunction: String + signInCrossOriginFunction: String + requestCrossOriginTokenFunction: String extendTokenExpires: String } @@ -37206,6 +39429,7 @@ input MembershipsModulePatch { entityIdsByMask: String entityIdsByPerm: String entityIdsFunction: String + memberProfilesTableId: UUID } """The output of our delete `DefaultIdsModule` mutation.""" @@ -37815,6 +40039,39 @@ input DeleteViewRuleInput { id: UUID! } +"""The output of our delete `SessionSecretsModule` mutation.""" +type DeleteSessionSecretsModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `SessionSecretsModule` that was deleted by this mutation.""" + sessionSecretsModule: SessionSecretsModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SessionSecretsModule`. May be used by Relay 1.""" + sessionSecretsModuleEdge( + """The method to use when ordering `SessionSecretsModule`.""" + orderBy: [SessionSecretsModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): SessionSecretsModuleEdge +} + +"""All input for the `deleteSessionSecretsModule` mutation.""" +input DeleteSessionSecretsModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `AppAdminGrant` mutation.""" type DeleteAppAdminGrantPayload { """ @@ -38081,6 +40338,39 @@ input DeleteConnectedAccountsModuleInput { id: UUID! } +"""The output of our delete `DevicesModule` mutation.""" +type DeleteDevicesModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `DevicesModule` that was deleted by this mutation.""" + devicesModule: DevicesModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `DevicesModule`. May be used by Relay 1.""" + devicesModuleEdge( + """The method to use when ordering `DevicesModule`.""" + orderBy: [DevicesModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): DevicesModuleEdge +} + +"""All input for the `deleteDevicesModule` mutation.""" +input DeleteDevicesModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `EmailsModule` mutation.""" type DeleteEmailsModulePayload { """ @@ -38180,6 +40470,39 @@ input DeleteUsersModuleInput { id: UUID! } +"""The output of our delete `WebauthnCredentialsModule` mutation.""" +type DeleteWebauthnCredentialsModulePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `WebauthnCredentialsModule` that was deleted by this mutation.""" + webauthnCredentialsModule: WebauthnCredentialsModule + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `WebauthnCredentialsModule`. May be used by Relay 1.""" + webauthnCredentialsModuleEdge( + """The method to use when ordering `WebauthnCredentialsModule`.""" + orderBy: [WebauthnCredentialsModuleOrderBy!]! = [PRIMARY_KEY_ASC] + ): WebauthnCredentialsModuleEdge +} + +"""All input for the `deleteWebauthnCredentialsModule` mutation.""" +input DeleteWebauthnCredentialsModuleInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `OrgAdminGrant` mutation.""" type DeleteOrgAdminGrantPayload { """ @@ -38279,43 +40602,6 @@ input DeleteCryptoAddressInput { id: UUID! } -"""The output of our delete `MembershipType` mutation.""" -type DeleteMembershipTypePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `MembershipType` that was deleted by this mutation.""" - membershipType: MembershipType - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `MembershipType`. May be used by Relay 1.""" - membershipTypeEdge( - """The method to use when ordering `MembershipType`.""" - orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] - ): MembershipTypeEdge -} - -"""All input for the `deleteMembershipType` mutation.""" -input DeleteMembershipTypeInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - - """ - Integer identifier for the membership type (1=App, 2=Organization, 3=Group) - """ - id: Int! -} - """The output of our delete `Object` mutation.""" type DeleteObjectPayload { """ @@ -38416,39 +40702,6 @@ input DeleteCryptoAddressesModuleInput { id: UUID! } -"""The output of our delete `ConnectedAccount` mutation.""" -type DeleteConnectedAccountPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `ConnectedAccount` that was deleted by this mutation.""" - connectedAccount: ConnectedAccount - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `ConnectedAccount`. May be used by Relay 1.""" - connectedAccountEdge( - """The method to use when ordering `ConnectedAccount`.""" - orderBy: [ConnectedAccountOrderBy!]! = [PRIMARY_KEY_ASC] - ): ConnectedAccountEdge -} - -"""All input for the `deleteConnectedAccount` mutation.""" -input DeleteConnectedAccountInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! -} - """The output of our delete `PhoneNumber` mutation.""" type DeletePhoneNumberPayload { """ @@ -38885,39 +41138,6 @@ input DeleteRateLimitsModuleInput { id: UUID! } -"""The output of our delete `TableTemplateModule` mutation.""" -type DeleteTableTemplateModulePayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `TableTemplateModule` that was deleted by this mutation.""" - tableTemplateModule: TableTemplateModule - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `TableTemplateModule`. May be used by Relay 1.""" - tableTemplateModuleEdge( - """The method to use when ordering `TableTemplateModule`.""" - orderBy: [TableTemplateModuleOrderBy!]! = [PRIMARY_KEY_ASC] - ): TableTemplateModuleEdge -} - -"""All input for the `deleteTableTemplateModule` mutation.""" -input DeleteTableTemplateModuleInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! -} - """The output of our delete `OrgChartEdgeGrant` mutation.""" type DeleteOrgChartEdgeGrantPayload { """ @@ -38984,6 +41204,43 @@ input DeleteOrgLimitInput { id: UUID! } +"""The output of our delete `MembershipType` mutation.""" +type DeleteMembershipTypePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `MembershipType` that was deleted by this mutation.""" + membershipType: MembershipType + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `MembershipType`. May be used by Relay 1.""" + membershipTypeEdge( + """The method to use when ordering `MembershipType`.""" + orderBy: [MembershipTypeOrderBy!]! = [PRIMARY_KEY_ASC] + ): MembershipTypeEdge +} + +"""All input for the `deleteMembershipType` mutation.""" +input DeleteMembershipTypeInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """ + Integer identifier for the membership type (1=App, 2=Organization, 3=Group) + """ + id: Int! +} + """The output of our delete `Domain` mutation.""" type DeleteDomainPayload { """ @@ -39485,6 +41742,39 @@ input DeleteDenormalizedTableFieldInput { id: UUID! } +"""The output of our delete `OrgMemberProfile` mutation.""" +type DeleteOrgMemberProfilePayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgMemberProfile` that was deleted by this mutation.""" + orgMemberProfile: OrgMemberProfile + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `OrgMemberProfile`. May be used by Relay 1.""" + orgMemberProfileEdge( + """The method to use when ordering `OrgMemberProfile`.""" + orderBy: [OrgMemberProfileOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMemberProfileEdge +} + +"""All input for the `deleteOrgMemberProfile` mutation.""" +input DeleteOrgMemberProfileInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `DatabaseTransfer` mutation.""" type DeleteDatabaseTransferPayload { """ @@ -39918,6 +42208,39 @@ input DeleteUniqueConstraintInput { id: UUID! } +"""The output of our delete `SpatialRelation` mutation.""" +type DeleteSpatialRelationPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `SpatialRelation` that was deleted by this mutation.""" + spatialRelation: SpatialRelation + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `SpatialRelation`. May be used by Relay 1.""" + spatialRelationEdge( + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!]! = [PRIMARY_KEY_ASC] + ): SpatialRelationEdge +} + +"""All input for the `deleteSpatialRelation` mutation.""" +input DeleteSpatialRelationInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `Policy` mutation.""" type DeletePolicyPayload { """ @@ -39951,6 +42274,41 @@ input DeletePolicyInput { id: UUID! } +"""The output of our delete `EntityTypeProvision` mutation.""" +type DeleteEntityTypeProvisionPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `EntityTypeProvision` that was deleted by this mutation.""" + entityTypeProvision: EntityTypeProvision + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `EntityTypeProvision`. May be used by Relay 1.""" + entityTypeProvisionEdge( + """The method to use when ordering `EntityTypeProvision`.""" + orderBy: [EntityTypeProvisionOrderBy!]! = [PRIMARY_KEY_ASC] + ): EntityTypeProvisionEdge +} + +"""All input for the `deleteEntityTypeProvision` mutation.""" +input DeleteEntityTypeProvisionInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + + """Unique identifier for this provision row.""" + id: UUID! +} + """The output of our delete `PermissionsModule` mutation.""" type DeletePermissionsModulePayload { """ @@ -40017,72 +42375,6 @@ input DeleteAppInviteInput { id: UUID! } -"""The output of our delete `AppMembership` mutation.""" -type DeleteAppMembershipPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `AppMembership` that was deleted by this mutation.""" - appMembership: AppMembership - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `AppMembership`. May be used by Relay 1.""" - appMembershipEdge( - """The method to use when ordering `AppMembership`.""" - orderBy: [AppMembershipOrderBy!]! = [PRIMARY_KEY_ASC] - ): AppMembershipEdge -} - -"""All input for the `deleteAppMembership` mutation.""" -input DeleteAppMembershipInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! -} - -"""The output of our delete `OrgMembership` mutation.""" -type DeleteOrgMembershipPayload { - """ - The exact same `clientMutationId` that was provided in the mutation input, - unchanged and unused. May be used by a client to track mutations. - """ - clientMutationId: String - - """The `OrgMembership` that was deleted by this mutation.""" - orgMembership: OrgMembership - - """ - Our root query field type. Allows us to run any query from our mutation payload. - """ - query: Query - - """An edge for our `OrgMembership`. May be used by Relay 1.""" - orgMembershipEdge( - """The method to use when ordering `OrgMembership`.""" - orderBy: [OrgMembershipOrderBy!]! = [PRIMARY_KEY_ASC] - ): OrgMembershipEdge -} - -"""All input for the `deleteOrgMembership` mutation.""" -input DeleteOrgMembershipInput { - """ - An arbitrary string value with no semantic meaning. Will be included in the - payload verbatim. May be used to track mutations by the client. - """ - clientMutationId: String - id: UUID! -} - """The output of our delete `EmbeddingChunk` mutation.""" type DeleteEmbeddingChunkPayload { """ @@ -40215,6 +42507,39 @@ input DeleteProfilesModuleInput { id: UUID! } +"""The output of our delete `AppMembership` mutation.""" +type DeleteAppMembershipPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `AppMembership` that was deleted by this mutation.""" + appMembership: AppMembership + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `AppMembership`. May be used by Relay 1.""" + appMembershipEdge( + """The method to use when ordering `AppMembership`.""" + orderBy: [AppMembershipOrderBy!]! = [PRIMARY_KEY_ASC] + ): AppMembershipEdge +} + +"""All input for the `deleteAppMembership` mutation.""" +input DeleteAppMembershipInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `Index` mutation.""" type DeleteIndexPayload { """ @@ -40316,6 +42641,39 @@ input DeleteSecureTableProvisionInput { id: UUID! } +"""The output of our delete `OrgMembership` mutation.""" +type DeleteOrgMembershipPayload { + """ + The exact same `clientMutationId` that was provided in the mutation input, + unchanged and unused. May be used by a client to track mutations. + """ + clientMutationId: String + + """The `OrgMembership` that was deleted by this mutation.""" + orgMembership: OrgMembership + + """ + Our root query field type. Allows us to run any query from our mutation payload. + """ + query: Query + + """An edge for our `OrgMembership`. May be used by Relay 1.""" + orgMembershipEdge( + """The method to use when ordering `OrgMembership`.""" + orderBy: [OrgMembershipOrderBy!]! = [PRIMARY_KEY_ASC] + ): OrgMembershipEdge +} + +"""All input for the `deleteOrgMembership` mutation.""" +input DeleteOrgMembershipInput { + """ + An arbitrary string value with no semantic meaning. Will be included in the + payload verbatim. May be used to track mutations by the client. + """ + clientMutationId: String + id: UUID! +} + """The output of our delete `BlueprintTemplate` mutation.""" type DeleteBlueprintTemplatePayload { """ @@ -40703,12 +43061,18 @@ type ConfirmUploadPayload { """The root query type which gives access points into the data universe.""" type Query { currentUserId: UUID - currentIpAddress: InternetAddress currentUserAgent: String + currentIpAddress: InternetAddress + requireStepUp(stepUpType: String): Boolean appPermissionsGetPaddedMask(mask: BitString): BitString orgPermissionsGetPaddedMask(mask: BitString): BitString stepsAchieved(level: String, roleId: UUID): Boolean revParse(dbId: UUID, storeId: UUID, refname: String): UUID + + """ + Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + """ + resolveBlueprintField(databaseId: UUID, tableId: UUID, fieldName: String): UUID orgIsManagerOf(pEntityId: UUID, pManagerId: UUID, pUserId: UUID, pMaxDepth: Int): Boolean """Reads and enables pagination through a set of `OrgGetManagersRecord`.""" @@ -40951,14 +43315,188 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: ApiSchemaFilter + where: ApiSchemaFilter + + """The method to use when ordering `ApiSchema`.""" + orderBy: [ApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] + ): ApiSchemaConnection + + """Reads and enables pagination through a set of `SiteTheme`.""" + siteThemes( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: SiteThemeFilter + + """The method to use when ordering `SiteTheme`.""" + orderBy: [SiteThemeOrderBy!] = [PRIMARY_KEY_ASC] + ): SiteThemeConnection + + """Reads and enables pagination through a set of `OrgMember`.""" + orgMembers( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgMemberFilter + + """The method to use when ordering `OrgMember`.""" + orderBy: [OrgMemberOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgMemberConnection + + """Reads and enables pagination through a set of `AppPermissionDefault`.""" + appPermissionDefaults( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppPermissionDefaultFilter + + """The method to use when ordering `AppPermissionDefault`.""" + orderBy: [AppPermissionDefaultOrderBy!] = [PRIMARY_KEY_ASC] + ): AppPermissionDefaultConnection + + """Reads and enables pagination through a set of `Ref`.""" + refs( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: RefFilter + + """The method to use when ordering `Ref`.""" + orderBy: [RefOrderBy!] = [PRIMARY_KEY_ASC] + ): RefConnection + + """Reads and enables pagination through a set of `Store`.""" + stores( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: StoreFilter + + """The method to use when ordering `Store`.""" + orderBy: [StoreOrderBy!] = [PRIMARY_KEY_ASC] + ): StoreConnection + + """Reads and enables pagination through a set of `ApiModule`.""" + apiModules( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: ApiModuleFilter - """The method to use when ordering `ApiSchema`.""" - orderBy: [ApiSchemaOrderBy!] = [PRIMARY_KEY_ASC] - ): ApiSchemaConnection + """The method to use when ordering `ApiModule`.""" + orderBy: [ApiModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): ApiModuleConnection - """Reads and enables pagination through a set of `SiteTheme`.""" - siteThemes( + """Reads and enables pagination through a set of `SiteModule`.""" + siteModules( """Only read the first `n` values of the set.""" first: Int @@ -40980,14 +43518,16 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: SiteThemeFilter + where: SiteModuleFilter - """The method to use when ordering `SiteTheme`.""" - orderBy: [SiteThemeOrderBy!] = [PRIMARY_KEY_ASC] - ): SiteThemeConnection + """The method to use when ordering `SiteModule`.""" + orderBy: [SiteModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): SiteModuleConnection - """Reads and enables pagination through a set of `OrgMember`.""" - orgMembers( + """ + Reads and enables pagination through a set of `EncryptedSecretsModule`. + """ + encryptedSecretsModules( """Only read the first `n` values of the set.""" first: Int @@ -41009,14 +43549,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgMemberFilter + where: EncryptedSecretsModuleFilter - """The method to use when ordering `OrgMember`.""" - orderBy: [OrgMemberOrderBy!] = [PRIMARY_KEY_ASC] - ): OrgMemberConnection + """The method to use when ordering `EncryptedSecretsModule`.""" + orderBy: [EncryptedSecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): EncryptedSecretsModuleConnection - """Reads and enables pagination through a set of `AppPermissionDefault`.""" - appPermissionDefaults( + """Reads and enables pagination through a set of `MembershipTypesModule`.""" + membershipTypesModules( """Only read the first `n` values of the set.""" first: Int @@ -41038,14 +43578,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: AppPermissionDefaultFilter + where: MembershipTypesModuleFilter - """The method to use when ordering `AppPermissionDefault`.""" - orderBy: [AppPermissionDefaultOrderBy!] = [PRIMARY_KEY_ASC] - ): AppPermissionDefaultConnection + """The method to use when ordering `MembershipTypesModule`.""" + orderBy: [MembershipTypesModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): MembershipTypesModuleConnection - """Reads and enables pagination through a set of `Ref`.""" - refs( + """Reads and enables pagination through a set of `SecretsModule`.""" + secretsModules( """Only read the first `n` values of the set.""" first: Int @@ -41067,14 +43607,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: RefFilter + where: SecretsModuleFilter - """The method to use when ordering `Ref`.""" - orderBy: [RefOrderBy!] = [PRIMARY_KEY_ASC] - ): RefConnection + """The method to use when ordering `SecretsModule`.""" + orderBy: [SecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): SecretsModuleConnection - """Reads and enables pagination through a set of `Store`.""" - stores( + """Reads and enables pagination through a set of `RoleType`.""" + roleTypes( """Only read the first `n` values of the set.""" first: Int @@ -41096,14 +43636,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: StoreFilter + where: RoleTypeFilter - """The method to use when ordering `Store`.""" - orderBy: [StoreOrderBy!] = [PRIMARY_KEY_ASC] - ): StoreConnection + """The method to use when ordering `RoleType`.""" + orderBy: [RoleTypeOrderBy!] = [PRIMARY_KEY_ASC] + ): RoleTypeConnection - """Reads and enables pagination through a set of `ApiModule`.""" - apiModules( + """Reads and enables pagination through a set of `OrgPermissionDefault`.""" + orgPermissionDefaults( """Only read the first `n` values of the set.""" first: Int @@ -41125,14 +43665,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: ApiModuleFilter + where: OrgPermissionDefaultFilter - """The method to use when ordering `ApiModule`.""" - orderBy: [ApiModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): ApiModuleConnection + """The method to use when ordering `OrgPermissionDefault`.""" + orderBy: [OrgPermissionDefaultOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgPermissionDefaultConnection - """Reads and enables pagination through a set of `SiteModule`.""" - siteModules( + """Reads and enables pagination through a set of `SchemaGrant`.""" + schemaGrants( """Only read the first `n` values of the set.""" first: Int @@ -41154,16 +43694,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: SiteModuleFilter + where: SchemaGrantFilter - """The method to use when ordering `SiteModule`.""" - orderBy: [SiteModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): SiteModuleConnection + """The method to use when ordering `SchemaGrant`.""" + orderBy: [SchemaGrantOrderBy!] = [PRIMARY_KEY_ASC] + ): SchemaGrantConnection - """ - Reads and enables pagination through a set of `EncryptedSecretsModule`. - """ - encryptedSecretsModules( + """Reads and enables pagination through a set of `TriggerFunction`.""" + triggerFunctions( """Only read the first `n` values of the set.""" first: Int @@ -41185,14 +43723,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: EncryptedSecretsModuleFilter + where: TriggerFunctionFilter - """The method to use when ordering `EncryptedSecretsModule`.""" - orderBy: [EncryptedSecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): EncryptedSecretsModuleConnection + """The method to use when ordering `TriggerFunction`.""" + orderBy: [TriggerFunctionOrderBy!] = [PRIMARY_KEY_ASC] + ): TriggerFunctionConnection - """Reads and enables pagination through a set of `MembershipTypesModule`.""" - membershipTypesModules( + """Reads and enables pagination through a set of `ViewRule`.""" + viewRules( """Only read the first `n` values of the set.""" first: Int @@ -41214,14 +43752,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: MembershipTypesModuleFilter + where: ViewRuleFilter - """The method to use when ordering `MembershipTypesModule`.""" - orderBy: [MembershipTypesModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): MembershipTypesModuleConnection + """The method to use when ordering `ViewRule`.""" + orderBy: [ViewRuleOrderBy!] = [PRIMARY_KEY_ASC] + ): ViewRuleConnection - """Reads and enables pagination through a set of `SecretsModule`.""" - secretsModules( + """Reads and enables pagination through a set of `SessionSecretsModule`.""" + sessionSecretsModules( """Only read the first `n` values of the set.""" first: Int @@ -41243,14 +43781,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: SecretsModuleFilter + where: SessionSecretsModuleFilter - """The method to use when ordering `SecretsModule`.""" - orderBy: [SecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): SecretsModuleConnection + """The method to use when ordering `SessionSecretsModule`.""" + orderBy: [SessionSecretsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): SessionSecretsModuleConnection - """Reads and enables pagination through a set of `RoleType`.""" - roleTypes( + """Reads and enables pagination through a set of `AppAdminGrant`.""" + appAdminGrants( """Only read the first `n` values of the set.""" first: Int @@ -41272,14 +43810,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: RoleTypeFilter + where: AppAdminGrantFilter - """The method to use when ordering `RoleType`.""" - orderBy: [RoleTypeOrderBy!] = [PRIMARY_KEY_ASC] - ): RoleTypeConnection + """The method to use when ordering `AppAdminGrant`.""" + orderBy: [AppAdminGrantOrderBy!] = [PRIMARY_KEY_ASC] + ): AppAdminGrantConnection - """Reads and enables pagination through a set of `OrgPermissionDefault`.""" - orgPermissionDefaults( + """Reads and enables pagination through a set of `AppOwnerGrant`.""" + appOwnerGrants( """Only read the first `n` values of the set.""" first: Int @@ -41301,14 +43839,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgPermissionDefaultFilter + where: AppOwnerGrantFilter - """The method to use when ordering `OrgPermissionDefault`.""" - orderBy: [OrgPermissionDefaultOrderBy!] = [PRIMARY_KEY_ASC] - ): OrgPermissionDefaultConnection + """The method to use when ordering `AppOwnerGrant`.""" + orderBy: [AppOwnerGrantOrderBy!] = [PRIMARY_KEY_ASC] + ): AppOwnerGrantConnection - """Reads and enables pagination through a set of `SchemaGrant`.""" - schemaGrants( + """Reads and enables pagination through a set of `MigrateFile`.""" + migrateFiles( """Only read the first `n` values of the set.""" first: Int @@ -41330,14 +43868,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: SchemaGrantFilter + where: MigrateFileFilter - """The method to use when ordering `SchemaGrant`.""" - orderBy: [SchemaGrantOrderBy!] = [PRIMARY_KEY_ASC] - ): SchemaGrantConnection + """The method to use when ordering `MigrateFile`.""" + orderBy: [MigrateFileOrderBy!] = [NATURAL] + ): MigrateFileConnection - """Reads and enables pagination through a set of `TriggerFunction`.""" - triggerFunctions( + """Reads and enables pagination through a set of `AppLimitDefault`.""" + appLimitDefaults( """Only read the first `n` values of the set.""" first: Int @@ -41359,14 +43897,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: TriggerFunctionFilter + where: AppLimitDefaultFilter - """The method to use when ordering `TriggerFunction`.""" - orderBy: [TriggerFunctionOrderBy!] = [PRIMARY_KEY_ASC] - ): TriggerFunctionConnection + """The method to use when ordering `AppLimitDefault`.""" + orderBy: [AppLimitDefaultOrderBy!] = [PRIMARY_KEY_ASC] + ): AppLimitDefaultConnection - """Reads and enables pagination through a set of `ViewRule`.""" - viewRules( + """Reads and enables pagination through a set of `OrgLimitDefault`.""" + orgLimitDefaults( """Only read the first `n` values of the set.""" first: Int @@ -41388,14 +43926,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: ViewRuleFilter + where: OrgLimitDefaultFilter - """The method to use when ordering `ViewRule`.""" - orderBy: [ViewRuleOrderBy!] = [PRIMARY_KEY_ASC] - ): ViewRuleConnection + """The method to use when ordering `OrgLimitDefault`.""" + orderBy: [OrgLimitDefaultOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgLimitDefaultConnection - """Reads and enables pagination through a set of `AppAdminGrant`.""" - appAdminGrants( + """Reads and enables pagination through a set of `DefaultPrivilege`.""" + defaultPrivileges( """Only read the first `n` values of the set.""" first: Int @@ -41417,14 +43955,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: AppAdminGrantFilter + where: DefaultPrivilegeFilter - """The method to use when ordering `AppAdminGrant`.""" - orderBy: [AppAdminGrantOrderBy!] = [PRIMARY_KEY_ASC] - ): AppAdminGrantConnection + """The method to use when ordering `DefaultPrivilege`.""" + orderBy: [DefaultPrivilegeOrderBy!] = [PRIMARY_KEY_ASC] + ): DefaultPrivilegeConnection - """Reads and enables pagination through a set of `AppOwnerGrant`.""" - appOwnerGrants( + """Reads and enables pagination through a set of `ViewGrant`.""" + viewGrants( """Only read the first `n` values of the set.""" first: Int @@ -41446,14 +43984,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: AppOwnerGrantFilter + where: ViewGrantFilter - """The method to use when ordering `AppOwnerGrant`.""" - orderBy: [AppOwnerGrantOrderBy!] = [PRIMARY_KEY_ASC] - ): AppOwnerGrantConnection + """The method to use when ordering `ViewGrant`.""" + orderBy: [ViewGrantOrderBy!] = [PRIMARY_KEY_ASC] + ): ViewGrantConnection - """Reads and enables pagination through a set of `MigrateFile`.""" - migrateFiles( + """Reads and enables pagination through a set of `Api`.""" + apis( """Only read the first `n` values of the set.""" first: Int @@ -41475,14 +44013,16 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: MigrateFileFilter + where: ApiFilter - """The method to use when ordering `MigrateFile`.""" - orderBy: [MigrateFileOrderBy!] = [NATURAL] - ): MigrateFileConnection + """The method to use when ordering `Api`.""" + orderBy: [ApiOrderBy!] = [PRIMARY_KEY_ASC] + ): ApiConnection - """Reads and enables pagination through a set of `AppLimitDefault`.""" - appLimitDefaults( + """ + Reads and enables pagination through a set of `ConnectedAccountsModule`. + """ + connectedAccountsModules( """Only read the first `n` values of the set.""" first: Int @@ -41504,14 +44044,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: AppLimitDefaultFilter + where: ConnectedAccountsModuleFilter - """The method to use when ordering `AppLimitDefault`.""" - orderBy: [AppLimitDefaultOrderBy!] = [PRIMARY_KEY_ASC] - ): AppLimitDefaultConnection + """The method to use when ordering `ConnectedAccountsModule`.""" + orderBy: [ConnectedAccountsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): ConnectedAccountsModuleConnection - """Reads and enables pagination through a set of `OrgLimitDefault`.""" - orgLimitDefaults( + """Reads and enables pagination through a set of `DevicesModule`.""" + devicesModules( """Only read the first `n` values of the set.""" first: Int @@ -41533,14 +44073,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgLimitDefaultFilter + where: DevicesModuleFilter - """The method to use when ordering `OrgLimitDefault`.""" - orderBy: [OrgLimitDefaultOrderBy!] = [PRIMARY_KEY_ASC] - ): OrgLimitDefaultConnection + """The method to use when ordering `DevicesModule`.""" + orderBy: [DevicesModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): DevicesModuleConnection - """Reads and enables pagination through a set of `DefaultPrivilege`.""" - defaultPrivileges( + """Reads and enables pagination through a set of `EmailsModule`.""" + emailsModules( """Only read the first `n` values of the set.""" first: Int @@ -41562,14 +44102,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: DefaultPrivilegeFilter + where: EmailsModuleFilter - """The method to use when ordering `DefaultPrivilege`.""" - orderBy: [DefaultPrivilegeOrderBy!] = [PRIMARY_KEY_ASC] - ): DefaultPrivilegeConnection + """The method to use when ordering `EmailsModule`.""" + orderBy: [EmailsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): EmailsModuleConnection - """Reads and enables pagination through a set of `ViewGrant`.""" - viewGrants( + """Reads and enables pagination through a set of `PhoneNumbersModule`.""" + phoneNumbersModules( """Only read the first `n` values of the set.""" first: Int @@ -41591,14 +44131,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: ViewGrantFilter + where: PhoneNumbersModuleFilter - """The method to use when ordering `ViewGrant`.""" - orderBy: [ViewGrantOrderBy!] = [PRIMARY_KEY_ASC] - ): ViewGrantConnection + """The method to use when ordering `PhoneNumbersModule`.""" + orderBy: [PhoneNumbersModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): PhoneNumbersModuleConnection - """Reads and enables pagination through a set of `Api`.""" - apis( + """Reads and enables pagination through a set of `UsersModule`.""" + usersModules( """Only read the first `n` values of the set.""" first: Int @@ -41620,16 +44160,16 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: ApiFilter + where: UsersModuleFilter - """The method to use when ordering `Api`.""" - orderBy: [ApiOrderBy!] = [PRIMARY_KEY_ASC] - ): ApiConnection + """The method to use when ordering `UsersModule`.""" + orderBy: [UsersModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): UsersModuleConnection """ - Reads and enables pagination through a set of `ConnectedAccountsModule`. + Reads and enables pagination through a set of `WebauthnCredentialsModule`. """ - connectedAccountsModules( + webauthnCredentialsModules( """Only read the first `n` values of the set.""" first: Int @@ -41651,98 +44191,11 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: ConnectedAccountsModuleFilter - - """The method to use when ordering `ConnectedAccountsModule`.""" - orderBy: [ConnectedAccountsModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): ConnectedAccountsModuleConnection + where: WebauthnCredentialsModuleFilter - """Reads and enables pagination through a set of `EmailsModule`.""" - emailsModules( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: EmailsModuleFilter - - """The method to use when ordering `EmailsModule`.""" - orderBy: [EmailsModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): EmailsModuleConnection - - """Reads and enables pagination through a set of `PhoneNumbersModule`.""" - phoneNumbersModules( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: PhoneNumbersModuleFilter - - """The method to use when ordering `PhoneNumbersModule`.""" - orderBy: [PhoneNumbersModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): PhoneNumbersModuleConnection - - """Reads and enables pagination through a set of `UsersModule`.""" - usersModules( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: UsersModuleFilter - - """The method to use when ordering `UsersModule`.""" - orderBy: [UsersModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): UsersModuleConnection + """The method to use when ordering `WebauthnCredentialsModule`.""" + orderBy: [WebauthnCredentialsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): WebauthnCredentialsModuleConnection """Reads and enables pagination through a set of `OrgAdminGrant`.""" orgAdminGrants( @@ -41831,8 +44284,8 @@ type Query { orderBy: [CryptoAddressOrderBy!] = [PRIMARY_KEY_ASC] ): CryptoAddressConnection - """Reads and enables pagination through a set of `MembershipType`.""" - membershipTypes( + """Reads and enables pagination through a set of `UserConnectedAccount`.""" + userConnectedAccounts( """Only read the first `n` values of the set.""" first: Int @@ -41854,11 +44307,11 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: MembershipTypeFilter + where: UserConnectedAccountFilter - """The method to use when ordering `MembershipType`.""" - orderBy: [MembershipTypeOrderBy!] = [PRIMARY_KEY_ASC] - ): MembershipTypeConnection + """The method to use when ordering `UserConnectedAccount`.""" + orderBy: [UserConnectedAccountOrderBy!] = [NATURAL] + ): UserConnectedAccountConnection """Reads and enables pagination through a set of `Object`.""" objects( @@ -41947,35 +44400,6 @@ type Query { orderBy: [CryptoAddressesModuleOrderBy!] = [PRIMARY_KEY_ASC] ): CryptoAddressesModuleConnection - """Reads and enables pagination through a set of `ConnectedAccount`.""" - connectedAccounts( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: ConnectedAccountFilter - - """The method to use when ordering `ConnectedAccount`.""" - orderBy: [ConnectedAccountOrderBy!] = [PRIMARY_KEY_ASC] - ): ConnectedAccountConnection - """Reads and enables pagination through a set of `PhoneNumber`.""" phoneNumbers( """Only read the first `n` values of the set.""" @@ -42318,127 +44742,127 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: CommitFilter - - """The method to use when ordering `Commit`.""" - orderBy: [CommitOrderBy!] = [PRIMARY_KEY_ASC] - ): CommitConnection - - """Reads and enables pagination through a set of `RateLimitsModule`.""" - rateLimitsModules( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: RateLimitsModuleFilter - - """The method to use when ordering `RateLimitsModule`.""" - orderBy: [RateLimitsModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): RateLimitsModuleConnection - - """Reads and enables pagination through a set of `TableTemplateModule`.""" - tableTemplateModules( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: TableTemplateModuleFilter - - """The method to use when ordering `TableTemplateModule`.""" - orderBy: [TableTemplateModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): TableTemplateModuleConnection - - """Reads and enables pagination through a set of `OrgChartEdgeGrant`.""" - orgChartEdgeGrants( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: OrgChartEdgeGrantFilter - - """The method to use when ordering `OrgChartEdgeGrant`.""" - orderBy: [OrgChartEdgeGrantOrderBy!] = [PRIMARY_KEY_ASC] - ): OrgChartEdgeGrantConnection - - """Reads and enables pagination through a set of `OrgLimit`.""" - orgLimits( - """Only read the first `n` values of the set.""" - first: Int - - """Only read the last `n` values of the set.""" - last: Int - - """ - Skip the first `n` values from our `after` cursor, an alternative to cursor - based pagination. May not be used with `last`. - """ - offset: Int - - """Read all values in the set before (above) this cursor.""" - before: Cursor - - """Read all values in the set after (below) this cursor.""" - after: Cursor - - """ - A filter to be used in determining which values should be returned by the collection. - """ - where: OrgLimitFilter + where: CommitFilter + + """The method to use when ordering `Commit`.""" + orderBy: [CommitOrderBy!] = [PRIMARY_KEY_ASC] + ): CommitConnection + + """Reads and enables pagination through a set of `RateLimitsModule`.""" + rateLimitsModules( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: RateLimitsModuleFilter + + """The method to use when ordering `RateLimitsModule`.""" + orderBy: [RateLimitsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): RateLimitsModuleConnection + + """Reads and enables pagination through a set of `OrgChartEdgeGrant`.""" + orgChartEdgeGrants( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgChartEdgeGrantFilter + + """The method to use when ordering `OrgChartEdgeGrant`.""" + orderBy: [OrgChartEdgeGrantOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgChartEdgeGrantConnection + + """Reads and enables pagination through a set of `OrgLimit`.""" + orgLimits( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgLimitFilter + + """The method to use when ordering `OrgLimit`.""" + orderBy: [OrgLimitOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgLimitConnection + + """Reads and enables pagination through a set of `MembershipType`.""" + membershipTypes( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: MembershipTypeFilter - """The method to use when ordering `OrgLimit`.""" - orderBy: [OrgLimitOrderBy!] = [PRIMARY_KEY_ASC] - ): OrgLimitConnection + """The method to use when ordering `MembershipType`.""" + orderBy: [MembershipTypeOrderBy!] = [PRIMARY_KEY_ASC] + ): MembershipTypeConnection """Reads and enables pagination through a set of `Domain`.""" domains( @@ -42877,6 +45301,35 @@ type Query { orderBy: [DenormalizedTableFieldOrderBy!] = [PRIMARY_KEY_ASC] ): DenormalizedTableFieldConnection + """Reads and enables pagination through a set of `OrgMemberProfile`.""" + orgMemberProfiles( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgMemberProfileFilter + + """The method to use when ordering `OrgMemberProfile`.""" + orderBy: [OrgMemberProfileOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgMemberProfileConnection + """Reads and enables pagination through a set of `SqlAction`.""" sqlActions( """Only read the first `n` values of the set.""" @@ -43314,8 +45767,8 @@ type Query { orderBy: [UniqueConstraintOrderBy!] = [PRIMARY_KEY_ASC] ): UniqueConstraintConnection - """Reads and enables pagination through a set of `Policy`.""" - policies( + """Reads and enables pagination through a set of `SpatialRelation`.""" + spatialRelations( """Only read the first `n` values of the set.""" first: Int @@ -43337,14 +45790,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: PolicyFilter + where: SpatialRelationFilter - """The method to use when ordering `Policy`.""" - orderBy: [PolicyOrderBy!] = [PRIMARY_KEY_ASC] - ): PolicyConnection + """The method to use when ordering `SpatialRelation`.""" + orderBy: [SpatialRelationOrderBy!] = [PRIMARY_KEY_ASC] + ): SpatialRelationConnection - """Reads and enables pagination through a set of `PermissionsModule`.""" - permissionsModules( + """Reads and enables pagination through a set of `Policy`.""" + policies( """Only read the first `n` values of the set.""" first: Int @@ -43366,14 +45819,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: PermissionsModuleFilter + where: PolicyFilter - """The method to use when ordering `PermissionsModule`.""" - orderBy: [PermissionsModuleOrderBy!] = [PRIMARY_KEY_ASC] - ): PermissionsModuleConnection + """The method to use when ordering `Policy`.""" + orderBy: [PolicyOrderBy!] = [PRIMARY_KEY_ASC] + ): PolicyConnection - """Reads and enables pagination through a set of `AppInvite`.""" - appInvites( + """Reads and enables pagination through a set of `EntityTypeProvision`.""" + entityTypeProvisions( """Only read the first `n` values of the set.""" first: Int @@ -43395,14 +45848,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: AppInviteFilter + where: EntityTypeProvisionFilter - """The method to use when ordering `AppInvite`.""" - orderBy: [AppInviteOrderBy!] = [PRIMARY_KEY_ASC] - ): AppInviteConnection + """The method to use when ordering `EntityTypeProvision`.""" + orderBy: [EntityTypeProvisionOrderBy!] = [PRIMARY_KEY_ASC] + ): EntityTypeProvisionConnection - """Reads and enables pagination through a set of `AppMembership`.""" - appMemberships( + """Reads and enables pagination through a set of `PermissionsModule`.""" + permissionsModules( """Only read the first `n` values of the set.""" first: Int @@ -43424,14 +45877,14 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: AppMembershipFilter + where: PermissionsModuleFilter - """The method to use when ordering `AppMembership`.""" - orderBy: [AppMembershipOrderBy!] = [PRIMARY_KEY_ASC] - ): AppMembershipConnection + """The method to use when ordering `PermissionsModule`.""" + orderBy: [PermissionsModuleOrderBy!] = [PRIMARY_KEY_ASC] + ): PermissionsModuleConnection - """Reads and enables pagination through a set of `OrgMembership`.""" - orgMemberships( + """Reads and enables pagination through a set of `AppInvite`.""" + appInvites( """Only read the first `n` values of the set.""" first: Int @@ -43453,11 +45906,11 @@ type Query { """ A filter to be used in determining which values should be returned by the collection. """ - where: OrgMembershipFilter + where: AppInviteFilter - """The method to use when ordering `OrgMembership`.""" - orderBy: [OrgMembershipOrderBy!] = [PRIMARY_KEY_ASC] - ): OrgMembershipConnection + """The method to use when ordering `AppInvite`.""" + orderBy: [AppInviteOrderBy!] = [PRIMARY_KEY_ASC] + ): AppInviteConnection """Reads and enables pagination through a set of `EmbeddingChunk`.""" embeddingChunks( @@ -43575,6 +46028,35 @@ type Query { orderBy: [ProfilesModuleOrderBy!] = [PRIMARY_KEY_ASC] ): ProfilesModuleConnection + """Reads and enables pagination through a set of `AppMembership`.""" + appMemberships( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: AppMembershipFilter + + """The method to use when ordering `AppMembership`.""" + orderBy: [AppMembershipOrderBy!] = [PRIMARY_KEY_ASC] + ): AppMembershipConnection + """Reads and enables pagination through a set of `Index`.""" indices( """Only read the first `n` values of the set.""" @@ -43662,6 +46144,35 @@ type Query { orderBy: [SecureTableProvisionOrderBy!] = [PRIMARY_KEY_ASC] ): SecureTableProvisionConnection + """Reads and enables pagination through a set of `OrgMembership`.""" + orgMemberships( + """Only read the first `n` values of the set.""" + first: Int + + """Only read the last `n` values of the set.""" + last: Int + + """ + Skip the first `n` values from our `after` cursor, an alternative to cursor + based pagination. May not be used with `last`. + """ + offset: Int + + """Read all values in the set before (above) this cursor.""" + before: Cursor + + """Read all values in the set after (below) this cursor.""" + after: Cursor + + """ + A filter to be used in determining which values should be returned by the collection. + """ + where: OrgMembershipFilter + + """The method to use when ordering `OrgMembership`.""" + orderBy: [OrgMembershipOrderBy!] = [PRIMARY_KEY_ASC] + ): OrgMembershipConnection + """Reads and enables pagination through a set of `BlueprintTemplate`.""" blueprintTemplates( """Only read the first `n` values of the set.""" @@ -43992,6 +46503,24 @@ type Mutation { """ input: RejectDatabaseTransferInput! ): RejectDatabaseTransferPayload + disconnectAccount( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DisconnectAccountInput! + ): DisconnectAccountPayload + revokeApiKey( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: RevokeApiKeyInput! + ): RevokeApiKeyPayload + revokeSession( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: RevokeSessionInput! + ): RevokeSessionPayload verifyPassword( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -44054,7 +46583,7 @@ type Mutation { ): InitEmptyRepoPayload """ - Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. + 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. """ constructBlueprint( """ @@ -44062,6 +46591,12 @@ type Mutation { """ input: ConstructBlueprintInput! ): ConstructBlueprintPayload + provisionNewUser( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: ProvisionNewUserInput! + ): ProvisionNewUserPayload resetPassword( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -44084,6 +46619,22 @@ type Mutation { """ input: CopyTemplateToBlueprintInput! ): CopyTemplateToBlueprintPayload + createApiKey( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateApiKeyInput! + ): CreateApiKeyPayload + + """ + Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + """ + provisionSpatialRelation( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: ProvisionSpatialRelationInput! + ): ProvisionSpatialRelationPayload bootstrapUser( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. @@ -44178,12 +46729,12 @@ type Mutation { """ input: ApplyRlsInput! ): ApplyRlsPayload - signInOneTimeToken( + signInCrossOrigin( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: SignInOneTimeTokenInput! - ): SignInOneTimeTokenPayload + input: SignInCrossOriginInput! + ): SignInCrossOriginPayload "Creates a new user database with all required modules, permissions, and RLS policies.\n\nParameters:\n - database_name: Name for the new database (required)\n - owner_id: UUID of the owner user (required)\n - include_invites: Include invite system (default: true)\n - include_groups: Include group-level memberships (default: false)\n - include_levels: Include levels/achievements (default: false)\n - bitlen: Bit length for permission masks (default: 64)\n - tokens_expiration: Token expiration interval (default: 30 days)\n\nReturns the database_id UUID of the newly created database.\n\nExample usage:\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid);\n SELECT metaschema_public.create_user_database('my_app', 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11'::uuid, true, true); -- with invites and groups\n" createUserDatabase( @@ -44198,24 +46749,24 @@ type Mutation { """ input: ExtendTokenExpiresInput! ): ExtendTokenExpiresPayload - signIn( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: SignInInput! - ): SignInPayload signUp( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ input: SignUpInput! ): SignUpPayload - oneTimeToken( + requestCrossOriginToken( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: OneTimeTokenInput! - ): OneTimeTokenPayload + input: RequestCrossOriginTokenInput! + ): RequestCrossOriginTokenPayload + signIn( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: SignInInput! + ): SignInPayload """ Composable table provisioning: creates or finds a table, then creates fields (so Data* modules can reference them), applies N nodes (Data* modules), enables RLS, creates grants, creates N policies, and optionally creates table-level indexes/full_text_searches/unique_constraints. All operations are graceful (skip existing). Accepts multiple nodes and multiple policies per call, unlike secure_table_provision which is limited to one of each. Returns (out_table_id, out_fields). @@ -44383,6 +46934,14 @@ type Mutation { input: CreateViewRuleInput! ): CreateViewRulePayload + """Creates a single `SessionSecretsModule`.""" + createSessionSecretsModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateSessionSecretsModuleInput! + ): CreateSessionSecretsModulePayload + """Creates a single `AppAdminGrant`.""" createAppAdminGrant( """ @@ -44455,6 +47014,14 @@ type Mutation { input: CreateConnectedAccountsModuleInput! ): CreateConnectedAccountsModulePayload + """Creates a single `DevicesModule`.""" + createDevicesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateDevicesModuleInput! + ): CreateDevicesModulePayload + """Creates a single `EmailsModule`.""" createEmailsModule( """ @@ -44479,6 +47046,14 @@ type Mutation { input: CreateUsersModuleInput! ): CreateUsersModulePayload + """Creates a single `WebauthnCredentialsModule`.""" + createWebauthnCredentialsModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateWebauthnCredentialsModuleInput! + ): CreateWebauthnCredentialsModulePayload + """Creates a single `OrgAdminGrant`.""" createOrgAdminGrant( """ @@ -44503,13 +47078,13 @@ type Mutation { input: CreateCryptoAddressInput! ): CreateCryptoAddressPayload - """Creates a single `MembershipType`.""" - createMembershipType( + """Creates a single `UserConnectedAccount`.""" + createUserConnectedAccount( """ The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. """ - input: CreateMembershipTypeInput! - ): CreateMembershipTypePayload + input: CreateUserConnectedAccountInput! + ): CreateUserConnectedAccountPayload """Creates a single `Object`.""" createObject( @@ -44535,14 +47110,6 @@ type Mutation { input: CreateCryptoAddressesModuleInput! ): CreateCryptoAddressesModulePayload - """Creates a single `ConnectedAccount`.""" - createConnectedAccount( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateConnectedAccountInput! - ): CreateConnectedAccountPayload - """Creates a single `PhoneNumber`.""" createPhoneNumber( """ @@ -44647,14 +47214,6 @@ type Mutation { input: CreateRateLimitsModuleInput! ): CreateRateLimitsModulePayload - """Creates a single `TableTemplateModule`.""" - createTableTemplateModule( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateTableTemplateModuleInput! - ): CreateTableTemplateModulePayload - """Creates a single `OrgChartEdgeGrant`.""" createOrgChartEdgeGrant( """ @@ -44671,6 +47230,14 @@ type Mutation { input: CreateOrgLimitInput! ): CreateOrgLimitPayload + """Creates a single `MembershipType`.""" + createMembershipType( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateMembershipTypeInput! + ): CreateMembershipTypePayload + """Creates a single `Domain`.""" createDomain( """ @@ -44791,6 +47358,14 @@ type Mutation { input: CreateDenormalizedTableFieldInput! ): CreateDenormalizedTableFieldPayload + """Creates a single `OrgMemberProfile`.""" + createOrgMemberProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgMemberProfileInput! + ): CreateOrgMemberProfilePayload + """Creates a single `SqlAction`.""" createSqlAction( """ @@ -44911,6 +47486,14 @@ type Mutation { input: CreateUniqueConstraintInput! ): CreateUniqueConstraintPayload + """Creates a single `SpatialRelation`.""" + createSpatialRelation( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateSpatialRelationInput! + ): CreateSpatialRelationPayload + """Creates a single `Policy`.""" createPolicy( """ @@ -44919,6 +47502,14 @@ type Mutation { input: CreatePolicyInput! ): CreatePolicyPayload + """Creates a single `EntityTypeProvision`.""" + createEntityTypeProvision( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateEntityTypeProvisionInput! + ): CreateEntityTypeProvisionPayload + """Creates a single `PermissionsModule`.""" createPermissionsModule( """ @@ -44935,22 +47526,6 @@ type Mutation { input: CreateAppInviteInput! ): CreateAppInvitePayload - """Creates a single `AppMembership`.""" - createAppMembership( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateAppMembershipInput! - ): CreateAppMembershipPayload - - """Creates a single `OrgMembership`.""" - createOrgMembership( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: CreateOrgMembershipInput! - ): CreateOrgMembershipPayload - """Creates a single `EmbeddingChunk`.""" createEmbeddingChunk( """ @@ -44983,6 +47558,14 @@ type Mutation { input: CreateProfilesModuleInput! ): CreateProfilesModulePayload + """Creates a single `AppMembership`.""" + createAppMembership( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateAppMembershipInput! + ): CreateAppMembershipPayload + """Creates a single `Index`.""" createIndex( """ @@ -45007,6 +47590,14 @@ type Mutation { input: CreateSecureTableProvisionInput! ): CreateSecureTableProvisionPayload + """Creates a single `OrgMembership`.""" + createOrgMembership( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: CreateOrgMembershipInput! + ): CreateOrgMembershipPayload + """Creates a single `BlueprintTemplate`.""" createBlueprintTemplate( """ @@ -45239,6 +47830,16 @@ type Mutation { input: UpdateViewRuleInput! ): UpdateViewRulePayload + """ + Updates a single `SessionSecretsModule` using a unique key and a patch. + """ + updateSessionSecretsModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateSessionSecretsModuleInput! + ): UpdateSessionSecretsModulePayload + """Updates a single `AppAdminGrant` using a unique key and a patch.""" updateAppAdminGrant( """ @@ -45305,6 +47906,14 @@ type Mutation { input: UpdateConnectedAccountsModuleInput! ): UpdateConnectedAccountsModulePayload + """Updates a single `DevicesModule` using a unique key and a patch.""" + updateDevicesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateDevicesModuleInput! + ): UpdateDevicesModulePayload + """Updates a single `EmailsModule` using a unique key and a patch.""" updateEmailsModule( """ @@ -45329,6 +47938,16 @@ type Mutation { input: UpdateUsersModuleInput! ): UpdateUsersModulePayload + """ + Updates a single `WebauthnCredentialsModule` using a unique key and a patch. + """ + updateWebauthnCredentialsModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateWebauthnCredentialsModuleInput! + ): UpdateWebauthnCredentialsModulePayload + """Updates a single `OrgAdminGrant` using a unique key and a patch.""" updateOrgAdminGrant( """ @@ -45353,14 +47972,6 @@ type Mutation { input: UpdateCryptoAddressInput! ): UpdateCryptoAddressPayload - """Updates a single `MembershipType` using a unique key and a patch.""" - updateMembershipType( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateMembershipTypeInput! - ): UpdateMembershipTypePayload - """Updates a single `Object` using a unique key and a patch.""" updateObject( """ @@ -45387,14 +47998,6 @@ type Mutation { input: UpdateCryptoAddressesModuleInput! ): UpdateCryptoAddressesModulePayload - """Updates a single `ConnectedAccount` using a unique key and a patch.""" - updateConnectedAccount( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateConnectedAccountInput! - ): UpdateConnectedAccountPayload - """Updates a single `PhoneNumber` using a unique key and a patch.""" updatePhoneNumber( """ @@ -45501,14 +48104,6 @@ type Mutation { input: UpdateRateLimitsModuleInput! ): UpdateRateLimitsModulePayload - """Updates a single `TableTemplateModule` using a unique key and a patch.""" - updateTableTemplateModule( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateTableTemplateModuleInput! - ): UpdateTableTemplateModulePayload - """Updates a single `OrgChartEdgeGrant` using a unique key and a patch.""" updateOrgChartEdgeGrant( """ @@ -45525,6 +48120,14 @@ type Mutation { input: UpdateOrgLimitInput! ): UpdateOrgLimitPayload + """Updates a single `MembershipType` using a unique key and a patch.""" + updateMembershipType( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateMembershipTypeInput! + ): UpdateMembershipTypePayload + """Updates a single `Domain` using a unique key and a patch.""" updateDomain( """ @@ -45651,6 +48254,14 @@ type Mutation { input: UpdateDenormalizedTableFieldInput! ): UpdateDenormalizedTableFieldPayload + """Updates a single `OrgMemberProfile` using a unique key and a patch.""" + updateOrgMemberProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgMemberProfileInput! + ): UpdateOrgMemberProfilePayload + """Updates a single `DatabaseTransfer` using a unique key and a patch.""" updateDatabaseTransfer( """ @@ -45759,6 +48370,14 @@ type Mutation { input: UpdateUniqueConstraintInput! ): UpdateUniqueConstraintPayload + """Updates a single `SpatialRelation` using a unique key and a patch.""" + updateSpatialRelation( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateSpatialRelationInput! + ): UpdateSpatialRelationPayload + """Updates a single `Policy` using a unique key and a patch.""" updatePolicy( """ @@ -45767,6 +48386,14 @@ type Mutation { input: UpdatePolicyInput! ): UpdatePolicyPayload + """Updates a single `EntityTypeProvision` using a unique key and a patch.""" + updateEntityTypeProvision( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateEntityTypeProvisionInput! + ): UpdateEntityTypeProvisionPayload + """Updates a single `PermissionsModule` using a unique key and a patch.""" updatePermissionsModule( """ @@ -45783,22 +48410,6 @@ type Mutation { input: UpdateAppInviteInput! ): UpdateAppInvitePayload - """Updates a single `AppMembership` using a unique key and a patch.""" - updateAppMembership( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateAppMembershipInput! - ): UpdateAppMembershipPayload - - """Updates a single `OrgMembership` using a unique key and a patch.""" - updateOrgMembership( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: UpdateOrgMembershipInput! - ): UpdateOrgMembershipPayload - """Updates a single `EmbeddingChunk` using a unique key and a patch.""" updateEmbeddingChunk( """ @@ -45831,6 +48442,14 @@ type Mutation { input: UpdateProfilesModuleInput! ): UpdateProfilesModulePayload + """Updates a single `AppMembership` using a unique key and a patch.""" + updateAppMembership( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateAppMembershipInput! + ): UpdateAppMembershipPayload + """Updates a single `Index` using a unique key and a patch.""" updateIndex( """ @@ -45857,6 +48476,14 @@ type Mutation { input: UpdateSecureTableProvisionInput! ): UpdateSecureTableProvisionPayload + """Updates a single `OrgMembership` using a unique key and a patch.""" + updateOrgMembership( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: UpdateOrgMembershipInput! + ): UpdateOrgMembershipPayload + """Updates a single `BlueprintTemplate` using a unique key and a patch.""" updateBlueprintTemplate( """ @@ -46083,6 +48710,14 @@ type Mutation { input: DeleteViewRuleInput! ): DeleteViewRulePayload + """Deletes a single `SessionSecretsModule` using a unique key.""" + deleteSessionSecretsModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteSessionSecretsModuleInput! + ): DeleteSessionSecretsModulePayload + """Deletes a single `AppAdminGrant` using a unique key.""" deleteAppAdminGrant( """ @@ -46147,6 +48782,14 @@ type Mutation { input: DeleteConnectedAccountsModuleInput! ): DeleteConnectedAccountsModulePayload + """Deletes a single `DevicesModule` using a unique key.""" + deleteDevicesModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteDevicesModuleInput! + ): DeleteDevicesModulePayload + """Deletes a single `EmailsModule` using a unique key.""" deleteEmailsModule( """ @@ -46171,6 +48814,14 @@ type Mutation { input: DeleteUsersModuleInput! ): DeleteUsersModulePayload + """Deletes a single `WebauthnCredentialsModule` using a unique key.""" + deleteWebauthnCredentialsModule( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteWebauthnCredentialsModuleInput! + ): DeleteWebauthnCredentialsModulePayload + """Deletes a single `OrgAdminGrant` using a unique key.""" deleteOrgAdminGrant( """ @@ -46195,14 +48846,6 @@ type Mutation { input: DeleteCryptoAddressInput! ): DeleteCryptoAddressPayload - """Deletes a single `MembershipType` using a unique key.""" - deleteMembershipType( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteMembershipTypeInput! - ): DeleteMembershipTypePayload - """Deletes a single `Object` using a unique key.""" deleteObject( """ @@ -46227,14 +48870,6 @@ type Mutation { input: DeleteCryptoAddressesModuleInput! ): DeleteCryptoAddressesModulePayload - """Deletes a single `ConnectedAccount` using a unique key.""" - deleteConnectedAccount( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteConnectedAccountInput! - ): DeleteConnectedAccountPayload - """Deletes a single `PhoneNumber` using a unique key.""" deletePhoneNumber( """ @@ -46339,14 +48974,6 @@ type Mutation { input: DeleteRateLimitsModuleInput! ): DeleteRateLimitsModulePayload - """Deletes a single `TableTemplateModule` using a unique key.""" - deleteTableTemplateModule( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteTableTemplateModuleInput! - ): DeleteTableTemplateModulePayload - """Deletes a single `OrgChartEdgeGrant` using a unique key.""" deleteOrgChartEdgeGrant( """ @@ -46363,6 +48990,14 @@ type Mutation { input: DeleteOrgLimitInput! ): DeleteOrgLimitPayload + """Deletes a single `MembershipType` using a unique key.""" + deleteMembershipType( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteMembershipTypeInput! + ): DeleteMembershipTypePayload + """Deletes a single `Domain` using a unique key.""" deleteDomain( """ @@ -46483,6 +49118,14 @@ type Mutation { input: DeleteDenormalizedTableFieldInput! ): DeleteDenormalizedTableFieldPayload + """Deletes a single `OrgMemberProfile` using a unique key.""" + deleteOrgMemberProfile( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgMemberProfileInput! + ): DeleteOrgMemberProfilePayload + """Deletes a single `DatabaseTransfer` using a unique key.""" deleteDatabaseTransfer( """ @@ -46587,6 +49230,14 @@ type Mutation { input: DeleteUniqueConstraintInput! ): DeleteUniqueConstraintPayload + """Deletes a single `SpatialRelation` using a unique key.""" + deleteSpatialRelation( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteSpatialRelationInput! + ): DeleteSpatialRelationPayload + """Deletes a single `Policy` using a unique key.""" deletePolicy( """ @@ -46595,6 +49246,14 @@ type Mutation { input: DeletePolicyInput! ): DeletePolicyPayload + """Deletes a single `EntityTypeProvision` using a unique key.""" + deleteEntityTypeProvision( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteEntityTypeProvisionInput! + ): DeleteEntityTypeProvisionPayload + """Deletes a single `PermissionsModule` using a unique key.""" deletePermissionsModule( """ @@ -46611,22 +49270,6 @@ type Mutation { input: DeleteAppInviteInput! ): DeleteAppInvitePayload - """Deletes a single `AppMembership` using a unique key.""" - deleteAppMembership( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteAppMembershipInput! - ): DeleteAppMembershipPayload - - """Deletes a single `OrgMembership` using a unique key.""" - deleteOrgMembership( - """ - The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. - """ - input: DeleteOrgMembershipInput! - ): DeleteOrgMembershipPayload - """Deletes a single `EmbeddingChunk` using a unique key.""" deleteEmbeddingChunk( """ @@ -46659,6 +49302,14 @@ type Mutation { input: DeleteProfilesModuleInput! ): DeleteProfilesModulePayload + """Deletes a single `AppMembership` using a unique key.""" + deleteAppMembership( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteAppMembershipInput! + ): DeleteAppMembershipPayload + """Deletes a single `Index` using a unique key.""" deleteIndex( """ @@ -46683,6 +49334,14 @@ type Mutation { input: DeleteSecureTableProvisionInput! ): DeleteSecureTableProvisionPayload + """Deletes a single `OrgMembership` using a unique key.""" + deleteOrgMembership( + """ + The exclusive input argument for this mutation. An object type, make sure to see documentation for this object’s fields. + """ + input: DeleteOrgMembershipInput! + ): DeleteOrgMembershipPayload + """Deletes a single `BlueprintTemplate` using a unique key.""" deleteBlueprintTemplate( """ diff --git a/sdk/constructive-sdk/src/admin/README.md b/sdk/constructive-sdk/src/admin/README.md index e03f1600a..dad73a512 100644 --- a/sdk/constructive-sdk/src/admin/README.md +++ b/sdk/constructive-sdk/src/admin/README.md @@ -8,7 +8,7 @@ ## Overview -- **Tables:** 32 +- **Tables:** 33 - **Custom queries:** 11 - **Custom mutations:** 5 diff --git a/sdk/constructive-sdk/src/admin/orm/README.md b/sdk/constructive-sdk/src/admin/orm/README.md index bb7c574ae..6d694a7cf 100644 --- a/sdk/constructive-sdk/src/admin/orm/README.md +++ b/sdk/constructive-sdk/src/admin/orm/README.md @@ -35,24 +35,25 @@ const db = createClient({ | `orgLimitDefault` | findMany, findOne, create, update, delete | | `orgAdminGrant` | findMany, findOne, create, update, delete | | `orgOwnerGrant` | findMany, findOne, create, update, delete | -| `membershipType` | findMany, findOne, create, update, delete | | `appLimit` | findMany, findOne, create, update, delete | | `appAchievement` | findMany, findOne, create, update, delete | | `appStep` | findMany, findOne, create, update, delete | | `appClaimedInvite` | findMany, findOne, create, update, delete | | `orgChartEdgeGrant` | findMany, findOne, create, update, delete | | `orgLimit` | findMany, findOne, create, update, delete | +| `membershipType` | findMany, findOne, create, update, delete | | `appGrant` | findMany, findOne, create, update, delete | | `appMembershipDefault` | findMany, findOne, create, update, delete | | `orgClaimedInvite` | findMany, findOne, create, update, delete | | `orgGrant` | findMany, findOne, create, update, delete | | `orgChartEdge` | findMany, findOne, create, update, delete | | `orgMembershipDefault` | findMany, findOne, create, update, delete | +| `orgMemberProfile` | findMany, findOne, create, update, delete | | `appLevel` | findMany, findOne, create, update, delete | | `appInvite` | findMany, findOne, create, update, delete | +| `orgInvite` | findMany, findOne, create, update, delete | | `appMembership` | findMany, findOne, create, update, delete | | `orgMembership` | findMany, findOne, create, update, delete | -| `orgInvite` | findMany, findOne, create, update, delete | ## Table Operations @@ -511,38 +512,6 @@ const updated = await db.orgOwnerGrant.update({ where: { id: '' }, data: { const deleted = await db.orgOwnerGrant.delete({ where: { id: '' } }).execute(); ``` -### `db.membershipType` - -CRUD operations for MembershipType records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | Int | No | -| `name` | String | Yes | -| `description` | String | Yes | -| `prefix` | String | Yes | - -**Operations:** - -```typescript -// List all membershipType records -const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true } }).execute(); - -// Get one by id -const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true } }).execute(); - -// Create -const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); -``` - ### `db.appLimit` CRUD operations for AppLimit records. @@ -749,6 +718,40 @@ const updated = await db.orgLimit.update({ where: { id: '' }, data: { name const deleted = await db.orgLimit.delete({ where: { id: '' } }).execute(); ``` +### `db.membershipType` + +CRUD operations for MembershipType records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | Int | No | +| `name` | String | Yes | +| `description` | String | Yes | +| `prefix` | String | Yes | +| `parentMembershipType` | Int | Yes | +| `hasUsersTableEntry` | Boolean | Yes | + +**Operations:** + +```typescript +// List all membershipType records +const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Get one by id +const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Create +const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); +``` + ### `db.appGrant` CRUD operations for AppGrant records. @@ -963,6 +966,45 @@ const updated = await db.orgMembershipDefault.update({ where: { id: '' }, const deleted = await db.orgMembershipDefault.delete({ where: { id: '' } }).execute(); ``` +### `db.orgMemberProfile` + +CRUD operations for OrgMemberProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `membershipId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `actorId` | UUID | Yes | +| `displayName` | String | Yes | +| `email` | String | Yes | +| `title` | String | Yes | +| `bio` | String | Yes | +| `profilePicture` | ConstructiveInternalTypeImage | Yes | + +**Operations:** + +```typescript +// List all orgMemberProfile records +const items = await db.orgMemberProfile.findMany({ select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Get one by id +const item = await db.orgMemberProfile.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Create +const created = await db.orgMemberProfile.create({ data: { membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgMemberProfile.update({ where: { id: '' }, data: { membershipId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgMemberProfile.delete({ where: { id: '' } }).execute(); +``` + ### `db.appLevel` CRUD operations for AppLevel records. @@ -1038,53 +1080,51 @@ const updated = await db.appInvite.update({ where: { id: '' }, data: { ema const deleted = await db.appInvite.delete({ where: { id: '' } }).execute(); ``` -### `db.appMembership` +### `db.orgInvite` -CRUD operations for AppMembership records. +CRUD operations for OrgInvite records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | +| `email` | ConstructiveInternalTypeEmail | Yes | +| `senderId` | UUID | Yes | +| `receiverId` | UUID | Yes | +| `inviteToken` | String | Yes | +| `inviteValid` | Boolean | Yes | +| `inviteLimit` | Int | Yes | +| `inviteCount` | Int | Yes | +| `multiple` | Boolean | Yes | +| `data` | JSON | Yes | +| `expiresAt` | Datetime | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | -| `createdBy` | UUID | Yes | -| `updatedBy` | UUID | Yes | -| `isApproved` | Boolean | Yes | -| `isBanned` | Boolean | Yes | -| `isDisabled` | Boolean | Yes | -| `isVerified` | Boolean | Yes | -| `isActive` | Boolean | Yes | -| `isOwner` | Boolean | Yes | -| `isAdmin` | Boolean | Yes | -| `permissions` | BitString | Yes | -| `granted` | BitString | Yes | -| `actorId` | UUID | Yes | -| `profileId` | UUID | Yes | +| `entityId` | UUID | Yes | **Operations:** ```typescript -// List all appMembership records -const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +// List all orgInvite records +const items = await db.orgInvite.findMany({ select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); // Get one by id -const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +const item = await db.orgInvite.findOne({ id: '', select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); // Create -const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.orgInvite.create({ data: { email: '', senderId: '', receiverId: '', inviteToken: '', inviteValid: '', inviteLimit: '', inviteCount: '', multiple: '', data: '', expiresAt: '', entityId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); +const updated = await db.orgInvite.update({ where: { id: '' }, data: { email: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.appMembership.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgInvite.delete({ where: { id: '' } }).execute(); ``` -### `db.orgMembership` +### `db.appMembership` -CRUD operations for OrgMembership records. +CRUD operations for AppMembership records. **Fields:** @@ -1098,74 +1138,79 @@ CRUD operations for OrgMembership records. | `isApproved` | Boolean | Yes | | `isBanned` | Boolean | Yes | | `isDisabled` | Boolean | Yes | +| `isVerified` | Boolean | Yes | | `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isAdmin` | Boolean | Yes | | `permissions` | BitString | Yes | | `granted` | BitString | Yes | | `actorId` | UUID | Yes | -| `entityId` | UUID | Yes | | `profileId` | UUID | Yes | **Operations:** ```typescript -// List all orgMembership records -const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +// List all appMembership records +const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Get one by id -const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Create -const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); +const updated = await db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgMembership.delete({ where: { id: '' } }).execute(); +const deleted = await db.appMembership.delete({ where: { id: '' } }).execute(); ``` -### `db.orgInvite` +### `db.orgMembership` -CRUD operations for OrgInvite records. +CRUD operations for OrgMembership records. **Fields:** | Field | Type | Editable | |-------|------|----------| | `id` | UUID | No | -| `email` | ConstructiveInternalTypeEmail | Yes | -| `senderId` | UUID | Yes | -| `receiverId` | UUID | Yes | -| `inviteToken` | String | Yes | -| `inviteValid` | Boolean | Yes | -| `inviteLimit` | Int | Yes | -| `inviteCount` | Int | Yes | -| `multiple` | Boolean | Yes | -| `data` | JSON | Yes | -| `expiresAt` | Datetime | Yes | | `createdAt` | Datetime | No | | `updatedAt` | Datetime | No | +| `createdBy` | UUID | Yes | +| `updatedBy` | UUID | Yes | +| `isApproved` | Boolean | Yes | +| `isBanned` | Boolean | Yes | +| `isDisabled` | Boolean | Yes | +| `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | +| `isOwner` | Boolean | Yes | +| `isAdmin` | Boolean | Yes | +| `permissions` | BitString | Yes | +| `granted` | BitString | Yes | +| `actorId` | UUID | Yes | | `entityId` | UUID | Yes | +| `isReadOnly` | Boolean | Yes | +| `profileId` | UUID | Yes | **Operations:** ```typescript -// List all orgInvite records -const items = await db.orgInvite.findMany({ select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); +// List all orgMembership records +const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Get one by id -const item = await db.orgInvite.findOne({ id: '', select: { id: true, email: true, senderId: true, receiverId: true, inviteToken: true, inviteValid: true, inviteLimit: true, inviteCount: true, multiple: true, data: true, expiresAt: true, createdAt: true, updatedAt: true, entityId: true } }).execute(); +const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Create -const created = await db.orgInvite.create({ data: { email: '', senderId: '', receiverId: '', inviteToken: '', inviteValid: '', inviteLimit: '', inviteCount: '', multiple: '', data: '', expiresAt: '', entityId: '' }, select: { id: true } }).execute(); +const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }, select: { id: true } }).execute(); // Update -const updated = await db.orgInvite.update({ where: { id: '' }, data: { email: '' }, select: { id: true } }).execute(); +const updated = await db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.orgInvite.delete({ where: { id: '' } }).execute(); +const deleted = await db.orgMembership.delete({ where: { id: '' } }).execute(); ``` ## Custom Operations diff --git a/sdk/constructive-sdk/src/admin/orm/index.ts b/sdk/constructive-sdk/src/admin/orm/index.ts index becae9d2a..9c5a64e61 100644 --- a/sdk/constructive-sdk/src/admin/orm/index.ts +++ b/sdk/constructive-sdk/src/admin/orm/index.ts @@ -19,24 +19,25 @@ import { AppLimitDefaultModel } from './models/appLimitDefault'; import { OrgLimitDefaultModel } from './models/orgLimitDefault'; import { OrgAdminGrantModel } from './models/orgAdminGrant'; import { OrgOwnerGrantModel } from './models/orgOwnerGrant'; -import { MembershipTypeModel } from './models/membershipType'; import { AppLimitModel } from './models/appLimit'; import { AppAchievementModel } from './models/appAchievement'; import { AppStepModel } from './models/appStep'; import { AppClaimedInviteModel } from './models/appClaimedInvite'; import { OrgChartEdgeGrantModel } from './models/orgChartEdgeGrant'; import { OrgLimitModel } from './models/orgLimit'; +import { MembershipTypeModel } from './models/membershipType'; import { AppGrantModel } from './models/appGrant'; import { AppMembershipDefaultModel } from './models/appMembershipDefault'; import { OrgClaimedInviteModel } from './models/orgClaimedInvite'; import { OrgGrantModel } from './models/orgGrant'; import { OrgChartEdgeModel } from './models/orgChartEdge'; import { OrgMembershipDefaultModel } from './models/orgMembershipDefault'; +import { OrgMemberProfileModel } from './models/orgMemberProfile'; import { AppLevelModel } from './models/appLevel'; import { AppInviteModel } from './models/appInvite'; +import { OrgInviteModel } from './models/orgInvite'; import { AppMembershipModel } from './models/appMembership'; import { OrgMembershipModel } from './models/orgMembership'; -import { OrgInviteModel } from './models/orgInvite'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; export type { OrmClientConfig, QueryResult, GraphQLError, GraphQLAdapter } from './client'; @@ -86,24 +87,25 @@ export function createClient(config: OrmClientConfig) { orgLimitDefault: new OrgLimitDefaultModel(client), orgAdminGrant: new OrgAdminGrantModel(client), orgOwnerGrant: new OrgOwnerGrantModel(client), - membershipType: new MembershipTypeModel(client), appLimit: new AppLimitModel(client), appAchievement: new AppAchievementModel(client), appStep: new AppStepModel(client), appClaimedInvite: new AppClaimedInviteModel(client), orgChartEdgeGrant: new OrgChartEdgeGrantModel(client), orgLimit: new OrgLimitModel(client), + membershipType: new MembershipTypeModel(client), appGrant: new AppGrantModel(client), appMembershipDefault: new AppMembershipDefaultModel(client), orgClaimedInvite: new OrgClaimedInviteModel(client), orgGrant: new OrgGrantModel(client), orgChartEdge: new OrgChartEdgeModel(client), orgMembershipDefault: new OrgMembershipDefaultModel(client), + orgMemberProfile: new OrgMemberProfileModel(client), appLevel: new AppLevelModel(client), appInvite: new AppInviteModel(client), + orgInvite: new OrgInviteModel(client), appMembership: new AppMembershipModel(client), orgMembership: new OrgMembershipModel(client), - orgInvite: new OrgInviteModel(client), query: createQueryOperations(client), mutation: createMutationOperations(client), }; diff --git a/sdk/constructive-sdk/src/admin/orm/input-types.ts b/sdk/constructive-sdk/src/admin/orm/input-types.ts index 66dd2861c..e65a723bc 100644 --- a/sdk/constructive-sdk/src/admin/orm/input-types.ts +++ b/sdk/constructive-sdk/src/admin/orm/input-types.ts @@ -370,17 +370,6 @@ export interface OrgOwnerGrant { createdAt?: string | null; updatedAt?: string | null; } -/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ -export interface MembershipType { - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; - /** Human-readable name of the membership type */ - name?: string | null; - /** Description of what this membership type represents */ - description?: string | null; - /** Short prefix used to namespace tables and functions for this membership scope */ - prefix?: string | null; -} /** Tracks per-actor usage counts against configurable maximum limits */ export interface AppLimit { id: string; @@ -460,6 +449,21 @@ export interface OrgLimit { max?: number | null; entityId?: string | null; } +/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ +export interface MembershipType { + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; + /** Human-readable name of the membership type */ + name?: string | null; + /** Description of what this membership type represents */ + description?: string | null; + /** Short prefix used to namespace tables and functions for this membership scope */ + prefix?: string | null; + /** Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) */ + parentMembershipType?: number | null; + /** When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs */ + hasUsersTableEntry?: boolean | null; +} /** Records of individual permission grants and revocations for members via bitmask */ export interface AppGrant { id: string; @@ -545,6 +549,28 @@ export interface OrgMembershipDefault { /** When a group is created, whether to auto-add existing org members as group members */ createGroupsCascadeMembers?: boolean | null; } +/** Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) */ +export interface OrgMemberProfile { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** References the membership this profile belongs to (1:1) */ + membershipId?: string | null; + /** References the entity this profile belongs to (used for RLS lookups) */ + entityId?: string | null; + /** References the user who owns this profile (for self-edit RLS) */ + actorId?: string | null; + /** Display name shown to other entity members */ + displayName?: string | null; + /** Email address visible to other entity members (auto-populated from verified primary email) */ + email?: string | null; + /** Job title or role description visible to other entity members */ + title?: string | null; + /** Short biography visible to other entity members */ + bio?: string | null; + /** Profile picture visible to other entity members */ + profilePicture?: ConstructiveInternalTypeImage | null; +} /** Defines available levels that users can achieve by completing requirements */ export interface AppLevel { id: string; @@ -583,6 +609,33 @@ export interface AppInvite { createdAt?: string | null; updatedAt?: string | null; } +/** Invitation records sent to prospective members via email, with token-based redemption and expiration */ +export interface OrgInvite { + id: string; + /** Email address of the invited recipient */ + email?: ConstructiveInternalTypeEmail | null; + /** User ID of the member who sent this invitation */ + senderId?: string | null; + /** User ID of the intended recipient, if targeting a specific user */ + receiverId?: string | null; + /** Unique random hex token used to redeem this invitation */ + inviteToken?: string | null; + /** Whether this invitation is still valid and can be redeemed */ + inviteValid?: boolean | null; + /** Maximum number of times this invite can be claimed; -1 means unlimited */ + inviteLimit?: number | null; + /** Running count of how many times this invite has been claimed */ + inviteCount?: number | null; + /** Whether this invite can be claimed by multiple recipients */ + multiple?: boolean | null; + /** Optional JSON payload of additional invite metadata */ + data?: Record | null; + /** Timestamp after which this invitation can no longer be redeemed */ + expiresAt?: string | null; + createdAt?: string | null; + updatedAt?: string | null; + entityId?: string | null; +} /** Tracks membership records linking actors to entities with permission bitmasks, ownership, and admin status */ export interface AppMembership { id: string; @@ -600,6 +653,8 @@ export interface AppMembership { isVerified?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -627,6 +682,8 @@ export interface OrgMembership { isDisabled?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -639,35 +696,10 @@ export interface OrgMembership { actorId?: string | null; /** References the entity (org or group) this membership belongs to */ entityId?: string | null; + /** Whether this member has read-only access (blocks mutations when true) */ + isReadOnly?: boolean | null; profileId?: string | null; } -/** Invitation records sent to prospective members via email, with token-based redemption and expiration */ -export interface OrgInvite { - id: string; - /** Email address of the invited recipient */ - email?: ConstructiveInternalTypeEmail | null; - /** User ID of the member who sent this invitation */ - senderId?: string | null; - /** User ID of the intended recipient, if targeting a specific user */ - receiverId?: string | null; - /** Unique random hex token used to redeem this invitation */ - inviteToken?: string | null; - /** Whether this invitation is still valid and can be redeemed */ - inviteValid?: boolean | null; - /** Maximum number of times this invite can be claimed; -1 means unlimited */ - inviteLimit?: number | null; - /** Running count of how many times this invite has been claimed */ - inviteCount?: number | null; - /** Whether this invite can be claimed by multiple recipients */ - multiple?: boolean | null; - /** Optional JSON payload of additional invite metadata */ - data?: Record | null; - /** Timestamp after which this invitation can no longer be redeemed */ - expiresAt?: string | null; - createdAt?: string | null; - updatedAt?: string | null; - entityId?: string | null; -} // ============ Relation Helper Types ============ export interface ConnectionResult { nodes: T[]; @@ -695,24 +727,29 @@ export interface AppLimitDefaultRelations {} export interface OrgLimitDefaultRelations {} export interface OrgAdminGrantRelations {} export interface OrgOwnerGrantRelations {} -export interface MembershipTypeRelations {} export interface AppLimitRelations {} export interface AppAchievementRelations {} export interface AppStepRelations {} export interface AppClaimedInviteRelations {} export interface OrgChartEdgeGrantRelations {} export interface OrgLimitRelations {} +export interface MembershipTypeRelations {} export interface AppGrantRelations {} export interface AppMembershipDefaultRelations {} export interface OrgClaimedInviteRelations {} export interface OrgGrantRelations {} export interface OrgChartEdgeRelations {} export interface OrgMembershipDefaultRelations {} +export interface OrgMemberProfileRelations { + membership?: OrgMembership | null; +} export interface AppLevelRelations {} export interface AppInviteRelations {} -export interface AppMembershipRelations {} -export interface OrgMembershipRelations {} export interface OrgInviteRelations {} +export interface AppMembershipRelations {} +export interface OrgMembershipRelations { + orgMemberProfileByMembershipId?: OrgMemberProfile | null; +} // ============ Entity Types With Relations ============ export type OrgGetManagersRecordWithRelations = OrgGetManagersRecord & OrgGetManagersRecordRelations; @@ -732,13 +769,13 @@ export type AppLimitDefaultWithRelations = AppLimitDefault & AppLimitDefaultRela export type OrgLimitDefaultWithRelations = OrgLimitDefault & OrgLimitDefaultRelations; export type OrgAdminGrantWithRelations = OrgAdminGrant & OrgAdminGrantRelations; export type OrgOwnerGrantWithRelations = OrgOwnerGrant & OrgOwnerGrantRelations; -export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type AppLimitWithRelations = AppLimit & AppLimitRelations; export type AppAchievementWithRelations = AppAchievement & AppAchievementRelations; export type AppStepWithRelations = AppStep & AppStepRelations; export type AppClaimedInviteWithRelations = AppClaimedInvite & AppClaimedInviteRelations; export type OrgChartEdgeGrantWithRelations = OrgChartEdgeGrant & OrgChartEdgeGrantRelations; export type OrgLimitWithRelations = OrgLimit & OrgLimitRelations; +export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type AppGrantWithRelations = AppGrant & AppGrantRelations; export type AppMembershipDefaultWithRelations = AppMembershipDefault & AppMembershipDefaultRelations; @@ -747,11 +784,12 @@ export type OrgGrantWithRelations = OrgGrant & OrgGrantRelations; export type OrgChartEdgeWithRelations = OrgChartEdge & OrgChartEdgeRelations; export type OrgMembershipDefaultWithRelations = OrgMembershipDefault & OrgMembershipDefaultRelations; +export type OrgMemberProfileWithRelations = OrgMemberProfile & OrgMemberProfileRelations; export type AppLevelWithRelations = AppLevel & AppLevelRelations; export type AppInviteWithRelations = AppInvite & AppInviteRelations; +export type OrgInviteWithRelations = OrgInvite & OrgInviteRelations; export type AppMembershipWithRelations = AppMembership & AppMembershipRelations; export type OrgMembershipWithRelations = OrgMembership & OrgMembershipRelations; -export type OrgInviteWithRelations = OrgInvite & OrgInviteRelations; // ============ Entity Select Types ============ export type OrgGetManagersRecordSelect = { userId?: boolean; @@ -844,12 +882,6 @@ export type OrgOwnerGrantSelect = { createdAt?: boolean; updatedAt?: boolean; }; -export type MembershipTypeSelect = { - id?: boolean; - name?: boolean; - description?: boolean; - prefix?: boolean; -}; export type AppLimitSelect = { id?: boolean; name?: boolean; @@ -900,6 +932,14 @@ export type OrgLimitSelect = { max?: boolean; entityId?: boolean; }; +export type MembershipTypeSelect = { + id?: boolean; + name?: boolean; + description?: boolean; + prefix?: boolean; + parentMembershipType?: boolean; + hasUsersTableEntry?: boolean; +}; export type AppGrantSelect = { id?: boolean; permissions?: boolean; @@ -958,6 +998,22 @@ export type OrgMembershipDefaultSelect = { deleteMemberCascadeGroups?: boolean; createGroupsCascadeMembers?: boolean; }; +export type OrgMemberProfileSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + membershipId?: boolean; + entityId?: boolean; + actorId?: boolean; + displayName?: boolean; + email?: boolean; + title?: boolean; + bio?: boolean; + profilePicture?: boolean; + membership?: { + select: OrgMembershipSelect; + }; +}; export type AppLevelSelect = { id?: boolean; name?: boolean; @@ -981,6 +1037,22 @@ export type AppInviteSelect = { createdAt?: boolean; updatedAt?: boolean; }; +export type OrgInviteSelect = { + id?: boolean; + email?: boolean; + senderId?: boolean; + receiverId?: boolean; + inviteToken?: boolean; + inviteValid?: boolean; + inviteLimit?: boolean; + inviteCount?: boolean; + multiple?: boolean; + data?: boolean; + expiresAt?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + entityId?: boolean; +}; export type AppMembershipSelect = { id?: boolean; createdAt?: boolean; @@ -992,6 +1064,7 @@ export type AppMembershipSelect = { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; @@ -1009,29 +1082,18 @@ export type OrgMembershipSelect = { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; granted?: boolean; actorId?: boolean; entityId?: boolean; + isReadOnly?: boolean; profileId?: boolean; -}; -export type OrgInviteSelect = { - id?: boolean; - email?: boolean; - senderId?: boolean; - receiverId?: boolean; - inviteToken?: boolean; - inviteValid?: boolean; - inviteLimit?: boolean; - inviteCount?: boolean; - multiple?: boolean; - data?: boolean; - expiresAt?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - entityId?: boolean; + orgMemberProfileByMembershipId?: { + select: OrgMemberProfileSelect; + }; }; // ============ Table Filter Types ============ export interface OrgGetManagersRecordFilter { @@ -1262,22 +1324,6 @@ export interface OrgOwnerGrantFilter { /** Negates the expression. */ not?: OrgOwnerGrantFilter; } -export interface MembershipTypeFilter { - /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; - /** Checks for all expressions in this list. */ - and?: MembershipTypeFilter[]; - /** Checks for any expressions in this list. */ - or?: MembershipTypeFilter[]; - /** Negates the expression. */ - not?: MembershipTypeFilter; -} export interface AppLimitFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1400,6 +1446,26 @@ export interface OrgLimitFilter { /** Negates the expression. */ not?: OrgLimitFilter; } +export interface MembershipTypeFilter { + /** Filter by the object’s `id` field. */ + id?: IntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `parentMembershipType` field. */ + parentMembershipType?: IntFilter; + /** Filter by the object’s `hasUsersTableEntry` field. */ + hasUsersTableEntry?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: MembershipTypeFilter[]; + /** Checks for any expressions in this list. */ + or?: MembershipTypeFilter[]; + /** Negates the expression. */ + not?: MembershipTypeFilter; +} export interface AppGrantFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1538,6 +1604,38 @@ export interface OrgMembershipDefaultFilter { /** Negates the expression. */ not?: OrgMembershipDefaultFilter; } +export interface OrgMemberProfileFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; +} export interface AppLevelFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1590,6 +1688,40 @@ export interface AppInviteFilter { /** Negates the expression. */ not?: AppInviteFilter; } +export interface OrgInviteFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `email` field. */ + email?: ConstructiveInternalTypeEmailFilter; + /** Filter by the object’s `senderId` field. */ + senderId?: UUIDFilter; + /** Filter by the object’s `receiverId` field. */ + receiverId?: UUIDFilter; + /** Filter by the object’s `inviteToken` field. */ + inviteToken?: StringFilter; + /** Filter by the object’s `inviteValid` field. */ + inviteValid?: BooleanFilter; + /** Filter by the object’s `inviteLimit` field. */ + inviteLimit?: IntFilter; + /** Filter by the object’s `inviteCount` field. */ + inviteCount?: IntFilter; + /** Filter by the object’s `multiple` field. */ + multiple?: BooleanFilter; + /** Filter by the object’s `expiresAt` field. */ + expiresAt?: DatetimeFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: OrgInviteFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgInviteFilter[]; + /** Negates the expression. */ + not?: OrgInviteFilter; +} export interface AppMembershipFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -1611,6 +1743,8 @@ export interface AppMembershipFilter { isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -1649,6 +1783,8 @@ export interface OrgMembershipFilter { isDisabled?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -1661,6 +1797,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ @@ -1669,40 +1807,10 @@ export interface OrgMembershipFilter { or?: OrgMembershipFilter[]; /** Negates the expression. */ not?: OrgMembershipFilter; -} -export interface OrgInviteFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `email` field. */ - email?: ConstructiveInternalTypeEmailFilter; - /** Filter by the object’s `senderId` field. */ - senderId?: UUIDFilter; - /** Filter by the object’s `receiverId` field. */ - receiverId?: UUIDFilter; - /** Filter by the object’s `inviteToken` field. */ - inviteToken?: StringFilter; - /** Filter by the object’s `inviteValid` field. */ - inviteValid?: BooleanFilter; - /** Filter by the object’s `inviteLimit` field. */ - inviteLimit?: IntFilter; - /** Filter by the object’s `inviteCount` field. */ - inviteCount?: IntFilter; - /** Filter by the object’s `multiple` field. */ - multiple?: BooleanFilter; - /** Filter by the object’s `expiresAt` field. */ - expiresAt?: DatetimeFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Filter by the object’s `entityId` field. */ - entityId?: UUIDFilter; - /** Checks for all expressions in this list. */ - and?: OrgInviteFilter[]; - /** Checks for any expressions in this list. */ - or?: OrgInviteFilter[]; - /** Negates the expression. */ - not?: OrgInviteFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; } // ============ OrderBy Types ============ export type OrgGetManagersRecordsOrderBy = @@ -1887,18 +1995,6 @@ export type OrgOwnerGrantOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type MembershipTypeOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'DESCRIPTION_ASC' - | 'DESCRIPTION_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC'; export type AppLimitOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -1999,6 +2095,22 @@ export type OrgLimitOrderBy = | 'MAX_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC'; +export type MembershipTypeOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PARENT_MEMBERSHIP_TYPE_ASC' + | 'PARENT_MEMBERSHIP_TYPE_DESC' + | 'HAS_USERS_TABLE_ENTRY_ASC' + | 'HAS_USERS_TABLE_ENTRY_DESC'; export type AppGrantOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -2115,6 +2227,32 @@ export type OrgMembershipDefaultOrderBy = | 'DELETE_MEMBER_CASCADE_GROUPS_DESC' | 'CREATE_GROUPS_CASCADE_MEMBERS_ASC' | 'CREATE_GROUPS_CASCADE_MEMBERS_DESC'; +export type OrgMemberProfileOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'BIO_ASC' + | 'BIO_DESC' + | 'PROFILE_PICTURE_ASC' + | 'PROFILE_PICTURE_DESC'; export type AppLevelOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -2161,6 +2299,38 @@ export type AppInviteOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgInviteOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'SENDER_ID_ASC' + | 'SENDER_ID_DESC' + | 'RECEIVER_ID_ASC' + | 'RECEIVER_ID_DESC' + | 'INVITE_TOKEN_ASC' + | 'INVITE_TOKEN_DESC' + | 'INVITE_VALID_ASC' + | 'INVITE_VALID_DESC' + | 'INVITE_LIMIT_ASC' + | 'INVITE_LIMIT_DESC' + | 'INVITE_COUNT_ASC' + | 'INVITE_COUNT_DESC' + | 'MULTIPLE_ASC' + | 'MULTIPLE_DESC' + | 'DATA_ASC' + | 'DATA_DESC' + | 'EXPIRES_AT_ASC' + | 'EXPIRES_AT_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC'; export type AppMembershipOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -2185,6 +2355,8 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -2219,6 +2391,8 @@ export type OrgMembershipOrderBy = | 'IS_DISABLED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -2231,40 +2405,10 @@ export type OrgMembershipOrderBy = | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' | 'PROFILE_ID_ASC' | 'PROFILE_ID_DESC'; -export type OrgInviteOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'EMAIL_ASC' - | 'EMAIL_DESC' - | 'SENDER_ID_ASC' - | 'SENDER_ID_DESC' - | 'RECEIVER_ID_ASC' - | 'RECEIVER_ID_DESC' - | 'INVITE_TOKEN_ASC' - | 'INVITE_TOKEN_DESC' - | 'INVITE_VALID_ASC' - | 'INVITE_VALID_DESC' - | 'INVITE_LIMIT_ASC' - | 'INVITE_LIMIT_DESC' - | 'INVITE_COUNT_ASC' - | 'INVITE_COUNT_DESC' - | 'MULTIPLE_ASC' - | 'MULTIPLE_DESC' - | 'DATA_ASC' - | 'DATA_DESC' - | 'EXPIRES_AT_ASC' - | 'EXPIRES_AT_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC' - | 'ENTITY_ID_ASC' - | 'ENTITY_ID_DESC'; // ============ CRUD Input Types ============ export interface CreateOrgGetManagersRecordInput { clientMutationId?: string; @@ -2572,28 +2716,6 @@ export interface DeleteOrgOwnerGrantInput { clientMutationId?: string; id: string; } -export interface CreateMembershipTypeInput { - clientMutationId?: string; - membershipType: { - name: string; - description: string; - prefix: string; - }; -} -export interface MembershipTypePatch { - name?: string | null; - description?: string | null; - prefix?: string | null; -} -export interface UpdateMembershipTypeInput { - clientMutationId?: string; - id: number; - membershipTypePatch: MembershipTypePatch; -} -export interface DeleteMembershipTypeInput { - clientMutationId?: string; - id: number; -} export interface CreateAppLimitInput { clientMutationId?: string; appLimit: { @@ -2740,6 +2862,32 @@ export interface DeleteOrgLimitInput { clientMutationId?: string; id: string; } +export interface CreateMembershipTypeInput { + clientMutationId?: string; + membershipType: { + name: string; + description: string; + prefix: string; + parentMembershipType?: number; + hasUsersTableEntry?: boolean; + }; +} +export interface MembershipTypePatch { + name?: string | null; + description?: string | null; + prefix?: string | null; + parentMembershipType?: number | null; + hasUsersTableEntry?: boolean | null; +} +export interface UpdateMembershipTypeInput { + clientMutationId?: string; + id: number; + membershipTypePatch: MembershipTypePatch; +} +export interface DeleteMembershipTypeInput { + clientMutationId?: string; + id: number; +} export interface CreateAppGrantInput { clientMutationId?: string; appGrant: { @@ -2892,6 +3040,39 @@ export interface DeleteOrgMembershipDefaultInput { clientMutationId?: string; id: string; } +export interface CreateOrgMemberProfileInput { + clientMutationId?: string; + orgMemberProfile: { + membershipId: string; + entityId: string; + actorId: string; + displayName?: string; + email?: string; + title?: string; + bio?: string; + profilePicture?: ConstructiveInternalTypeImage; + }; +} +export interface OrgMemberProfilePatch { + membershipId?: string | null; + entityId?: string | null; + actorId?: string | null; + displayName?: string | null; + email?: string | null; + title?: string | null; + bio?: string | null; + profilePicture?: ConstructiveInternalTypeImage | null; + profilePictureUpload?: File | null; +} +export interface UpdateOrgMemberProfileInput { + clientMutationId?: string; + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; +} +export interface DeleteOrgMemberProfileInput { + clientMutationId?: string; + id: string; +} export interface CreateAppLevelInput { clientMutationId?: string; appLevel: { @@ -2951,6 +3132,44 @@ export interface DeleteAppInviteInput { clientMutationId?: string; id: string; } +export interface CreateOrgInviteInput { + clientMutationId?: string; + orgInvite: { + email?: ConstructiveInternalTypeEmail; + senderId?: string; + receiverId?: string; + inviteToken?: string; + inviteValid?: boolean; + inviteLimit?: number; + inviteCount?: number; + multiple?: boolean; + data?: Record; + expiresAt?: string; + entityId: string; + }; +} +export interface OrgInvitePatch { + email?: ConstructiveInternalTypeEmail | null; + senderId?: string | null; + receiverId?: string | null; + inviteToken?: string | null; + inviteValid?: boolean | null; + inviteLimit?: number | null; + inviteCount?: number | null; + multiple?: boolean | null; + data?: Record | null; + expiresAt?: string | null; + entityId?: string | null; +} +export interface UpdateOrgInviteInput { + clientMutationId?: string; + id: string; + orgInvitePatch: OrgInvitePatch; +} +export interface DeleteOrgInviteInput { + clientMutationId?: string; + id: string; +} export interface CreateAppMembershipInput { clientMutationId?: string; appMembership: { @@ -2961,6 +3180,7 @@ export interface CreateAppMembershipInput { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; @@ -2977,6 +3197,7 @@ export interface AppMembershipPatch { isDisabled?: boolean | null; isVerified?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; @@ -3002,12 +3223,14 @@ export interface CreateOrgMembershipInput { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; granted?: string; actorId: string; entityId: string; + isReadOnly?: boolean; profileId?: string; }; } @@ -3018,58 +3241,22 @@ export interface OrgMembershipPatch { isBanned?: boolean | null; isDisabled?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; granted?: string | null; actorId?: string | null; entityId?: string | null; + isReadOnly?: boolean | null; profileId?: string | null; } export interface UpdateOrgMembershipInput { clientMutationId?: string; id: string; - orgMembershipPatch: OrgMembershipPatch; -} -export interface DeleteOrgMembershipInput { - clientMutationId?: string; - id: string; -} -export interface CreateOrgInviteInput { - clientMutationId?: string; - orgInvite: { - email?: ConstructiveInternalTypeEmail; - senderId?: string; - receiverId?: string; - inviteToken?: string; - inviteValid?: boolean; - inviteLimit?: number; - inviteCount?: number; - multiple?: boolean; - data?: Record; - expiresAt?: string; - entityId: string; - }; -} -export interface OrgInvitePatch { - email?: ConstructiveInternalTypeEmail | null; - senderId?: string | null; - receiverId?: string | null; - inviteToken?: string | null; - inviteValid?: boolean | null; - inviteLimit?: number | null; - inviteCount?: number | null; - multiple?: boolean | null; - data?: Record | null; - expiresAt?: string | null; - entityId?: string | null; -} -export interface UpdateOrgInviteInput { - clientMutationId?: string; - id: string; - orgInvitePatch: OrgInvitePatch; + orgMembershipPatch: OrgMembershipPatch; } -export interface DeleteOrgInviteInput { +export interface DeleteOrgMembershipInput { clientMutationId?: string; id: string; } @@ -3884,51 +4071,6 @@ export type DeleteOrgOwnerGrantPayloadSelect = { select: OrgOwnerGrantEdgeSelect; }; }; -export interface CreateMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was created by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} -export type CreateMembershipTypePayloadSelect = { - clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; - }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; - }; -}; -export interface UpdateMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was updated by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} -export type UpdateMembershipTypePayloadSelect = { - clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; - }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; - }; -}; -export interface DeleteMembershipTypePayload { - clientMutationId?: string | null; - /** The `MembershipType` that was deleted by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; -} -export type DeleteMembershipTypePayloadSelect = { - clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; - }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; - }; -}; export interface CreateAppLimitPayload { clientMutationId?: string | null; /** The `AppLimit` that was created by this mutation. */ @@ -4199,6 +4341,51 @@ export type DeleteOrgLimitPayloadSelect = { select: OrgLimitEdgeSelect; }; }; +export interface CreateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was created by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type CreateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface UpdateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was updated by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type UpdateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface DeleteMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was deleted by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type DeleteMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; export interface CreateAppGrantPayload { clientMutationId?: string | null; /** The `AppGrant` that was created by this mutation. */ @@ -4469,6 +4656,51 @@ export type DeleteOrgMembershipDefaultPayloadSelect = { select: OrgMembershipDefaultEdgeSelect; }; }; +export interface CreateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was created by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type CreateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface UpdateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was updated by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type UpdateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface DeleteOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was deleted by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type DeleteOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; export interface CreateAppLevelPayload { clientMutationId?: string | null; /** The `AppLevel` that was created by this mutation. */ @@ -4559,6 +4791,51 @@ export type DeleteAppInvitePayloadSelect = { select: AppInviteEdgeSelect; }; }; +export interface CreateOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was created by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} +export type CreateOrgInvitePayloadSelect = { + clientMutationId?: boolean; + orgInvite?: { + select: OrgInviteSelect; + }; + orgInviteEdge?: { + select: OrgInviteEdgeSelect; + }; +}; +export interface UpdateOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was updated by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} +export type UpdateOrgInvitePayloadSelect = { + clientMutationId?: boolean; + orgInvite?: { + select: OrgInviteSelect; + }; + orgInviteEdge?: { + select: OrgInviteEdgeSelect; + }; +}; +export interface DeleteOrgInvitePayload { + clientMutationId?: string | null; + /** The `OrgInvite` that was deleted by this mutation. */ + orgInvite?: OrgInvite | null; + orgInviteEdge?: OrgInviteEdge | null; +} +export type DeleteOrgInvitePayloadSelect = { + clientMutationId?: boolean; + orgInvite?: { + select: OrgInviteSelect; + }; + orgInviteEdge?: { + select: OrgInviteEdgeSelect; + }; +}; export interface CreateAppMembershipPayload { clientMutationId?: string | null; /** The `AppMembership` that was created by this mutation. */ @@ -4649,51 +4926,6 @@ export type DeleteOrgMembershipPayloadSelect = { select: OrgMembershipEdgeSelect; }; }; -export interface CreateOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was created by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} -export type CreateOrgInvitePayloadSelect = { - clientMutationId?: boolean; - orgInvite?: { - select: OrgInviteSelect; - }; - orgInviteEdge?: { - select: OrgInviteEdgeSelect; - }; -}; -export interface UpdateOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was updated by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} -export type UpdateOrgInvitePayloadSelect = { - clientMutationId?: boolean; - orgInvite?: { - select: OrgInviteSelect; - }; - orgInviteEdge?: { - select: OrgInviteEdgeSelect; - }; -}; -export interface DeleteOrgInvitePayload { - clientMutationId?: string | null; - /** The `OrgInvite` that was deleted by this mutation. */ - orgInvite?: OrgInvite | null; - orgInviteEdge?: OrgInviteEdge | null; -} -export type DeleteOrgInvitePayloadSelect = { - clientMutationId?: boolean; - orgInvite?: { - select: OrgInviteSelect; - }; - orgInviteEdge?: { - select: OrgInviteEdgeSelect; - }; -}; /** A `AppPermission` edge in the connection. */ export interface AppPermissionEdge { cursor?: string | null; @@ -4855,18 +5087,6 @@ export type OrgOwnerGrantEdgeSelect = { select: OrgOwnerGrantSelect; }; }; -/** A `MembershipType` edge in the connection. */ -export interface MembershipTypeEdge { - cursor?: string | null; - /** The `MembershipType` at the end of the edge. */ - node?: MembershipType | null; -} -export type MembershipTypeEdgeSelect = { - cursor?: boolean; - node?: { - select: MembershipTypeSelect; - }; -}; /** A `AppLimit` edge in the connection. */ export interface AppLimitEdge { cursor?: string | null; @@ -4939,6 +5159,18 @@ export type OrgLimitEdgeSelect = { select: OrgLimitSelect; }; }; +/** A `MembershipType` edge in the connection. */ +export interface MembershipTypeEdge { + cursor?: string | null; + /** The `MembershipType` at the end of the edge. */ + node?: MembershipType | null; +} +export type MembershipTypeEdgeSelect = { + cursor?: boolean; + node?: { + select: MembershipTypeSelect; + }; +}; /** A `AppGrant` edge in the connection. */ export interface AppGrantEdge { cursor?: string | null; @@ -5011,6 +5243,18 @@ export type OrgMembershipDefaultEdgeSelect = { select: OrgMembershipDefaultSelect; }; }; +/** A `OrgMemberProfile` edge in the connection. */ +export interface OrgMemberProfileEdge { + cursor?: string | null; + /** The `OrgMemberProfile` at the end of the edge. */ + node?: OrgMemberProfile | null; +} +export type OrgMemberProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgMemberProfileSelect; + }; +}; /** A `AppLevel` edge in the connection. */ export interface AppLevelEdge { cursor?: string | null; @@ -5035,6 +5279,18 @@ export type AppInviteEdgeSelect = { select: AppInviteSelect; }; }; +/** A `OrgInvite` edge in the connection. */ +export interface OrgInviteEdge { + cursor?: string | null; + /** The `OrgInvite` at the end of the edge. */ + node?: OrgInvite | null; +} +export type OrgInviteEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgInviteSelect; + }; +}; /** A `AppMembership` edge in the connection. */ export interface AppMembershipEdge { cursor?: string | null; @@ -5059,15 +5315,3 @@ export type OrgMembershipEdgeSelect = { select: OrgMembershipSelect; }; }; -/** A `OrgInvite` edge in the connection. */ -export interface OrgInviteEdge { - cursor?: string | null; - /** The `OrgInvite` at the end of the edge. */ - node?: OrgInvite | null; -} -export type OrgInviteEdgeSelect = { - cursor?: boolean; - node?: { - select: OrgInviteSelect; - }; -}; diff --git a/sdk/constructive-sdk/src/admin/orm/models/index.ts b/sdk/constructive-sdk/src/admin/orm/models/index.ts index 91876b01c..a82780d8f 100644 --- a/sdk/constructive-sdk/src/admin/orm/models/index.ts +++ b/sdk/constructive-sdk/src/admin/orm/models/index.ts @@ -17,21 +17,22 @@ export { AppLimitDefaultModel } from './appLimitDefault'; export { OrgLimitDefaultModel } from './orgLimitDefault'; export { OrgAdminGrantModel } from './orgAdminGrant'; export { OrgOwnerGrantModel } from './orgOwnerGrant'; -export { MembershipTypeModel } from './membershipType'; export { AppLimitModel } from './appLimit'; export { AppAchievementModel } from './appAchievement'; export { AppStepModel } from './appStep'; export { AppClaimedInviteModel } from './appClaimedInvite'; export { OrgChartEdgeGrantModel } from './orgChartEdgeGrant'; export { OrgLimitModel } from './orgLimit'; +export { MembershipTypeModel } from './membershipType'; export { AppGrantModel } from './appGrant'; export { AppMembershipDefaultModel } from './appMembershipDefault'; export { OrgClaimedInviteModel } from './orgClaimedInvite'; export { OrgGrantModel } from './orgGrant'; export { OrgChartEdgeModel } from './orgChartEdge'; export { OrgMembershipDefaultModel } from './orgMembershipDefault'; +export { OrgMemberProfileModel } from './orgMemberProfile'; export { AppLevelModel } from './appLevel'; export { AppInviteModel } from './appInvite'; +export { OrgInviteModel } from './orgInvite'; export { AppMembershipModel } from './appMembership'; export { OrgMembershipModel } from './orgMembership'; -export { OrgInviteModel } from './orgInvite'; diff --git a/sdk/constructive-sdk/src/admin/orm/models/orgMemberProfile.ts b/sdk/constructive-sdk/src/admin/orm/models/orgMemberProfile.ts new file mode 100644 index 000000000..de551ba79 --- /dev/null +++ b/sdk/constructive-sdk/src/admin/orm/models/orgMemberProfile.ts @@ -0,0 +1,237 @@ +/** + * OrgMemberProfile model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + OrgMemberProfile, + OrgMemberProfileWithRelations, + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, + CreateOrgMemberProfileInput, + UpdateOrgMemberProfileInput, + OrgMemberProfilePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgMemberProfileModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMemberProfiles: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgMemberProfile', + 'orgMemberProfiles', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMemberProfiles: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgMemberProfile', + 'orgMemberProfiles', + args.select, + { + where: args?.where, + }, + 'OrgMemberProfileFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMemberProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgMemberProfile', + 'orgMemberProfiles', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfile', + document, + variables, + transform: (data: { + orgMemberProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgMemberProfile', + 'createOrgMemberProfile', + 'orgMemberProfile', + args.select, + args.data, + 'CreateOrgMemberProfileInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMemberProfile', + fieldName: 'createOrgMemberProfile', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgMemberProfilePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgMemberProfile', + 'updateOrgMemberProfile', + 'orgMemberProfile', + args.select, + args.where.id, + args.data, + 'UpdateOrgMemberProfileInput', + 'id', + 'orgMemberProfilePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMemberProfile', + fieldName: 'updateOrgMemberProfile', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgMemberProfile', + 'deleteOrgMemberProfile', + 'orgMemberProfile', + { + id: args.where.id, + }, + 'DeleteOrgMemberProfileInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMemberProfile', + fieldName: 'deleteOrgMemberProfile', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/auth/README.md b/sdk/constructive-sdk/src/auth/README.md index 3df829ebd..3d36bbaeb 100644 --- a/sdk/constructive-sdk/src/auth/README.md +++ b/sdk/constructive-sdk/src/auth/README.md @@ -9,8 +9,8 @@ ## Overview - **Tables:** 7 -- **Custom queries:** 4 -- **Custom mutations:** 19 +- **Custom queries:** 5 +- **Custom mutations:** 24 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/auth/orm/README.md b/sdk/constructive-sdk/src/auth/orm/README.md index 4160a6350..9f1277067 100644 --- a/sdk/constructive-sdk/src/auth/orm/README.md +++ b/sdk/constructive-sdk/src/auth/orm/README.md @@ -24,9 +24,9 @@ const db = createClient({ | `email` | findMany, findOne, create, update, delete | | `phoneNumber` | findMany, findOne, create, update, delete | | `cryptoAddress` | findMany, findOne, create, update, delete | -| `connectedAccount` | findMany, findOne, create, update, delete | | `auditLog` | findMany, findOne, create, update, delete | | `roleType` | findMany, findOne, create, update, delete | +| `userConnectedAccount` | findMany, findOne, create, update, delete | | `user` | findMany, findOne, create, update, delete | ## Table Operations @@ -137,42 +137,6 @@ const updated = await db.cryptoAddress.update({ where: { id: '' }, data: { const deleted = await db.cryptoAddress.delete({ where: { id: '' } }).execute(); ``` -### `db.connectedAccount` - -CRUD operations for ConnectedAccount records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | UUID | No | -| `ownerId` | UUID | Yes | -| `service` | String | Yes | -| `identifier` | String | Yes | -| `details` | JSON | Yes | -| `isVerified` | Boolean | Yes | -| `createdAt` | Datetime | No | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all connectedAccount records -const items = await db.connectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.connectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Create -const created = await db.connectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.connectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.connectedAccount.delete({ where: { id: '' } }).execute(); -``` - ### `db.auditLog` CRUD operations for AuditLog records. @@ -239,6 +203,42 @@ const updated = await db.roleType.update({ where: { id: '' }, data: { name: const deleted = await db.roleType.delete({ where: { id: '' } }).execute(); ``` +### `db.userConnectedAccount` + +CRUD operations for UserConnectedAccount records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `ownerId` | UUID | Yes | +| `service` | String | Yes | +| `identifier` | String | Yes | +| `details` | JSON | Yes | +| `isVerified` | Boolean | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all userConnectedAccount records +const items = await db.userConnectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.userConnectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.userConnectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userConnectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userConnectedAccount.delete({ where: { id: '' } }).execute(); +``` + ### `db.user` CRUD operations for User records. @@ -283,26 +283,26 @@ const deleted = await db.user.delete({ where: { id: '' } }).execute(); ## Custom Operations -### `db.query.currentIpAddress` +### `db.query.currentUserAgent` -currentIpAddress +currentUserAgent - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentIpAddress().execute(); +const result = await db.query.currentUserAgent().execute(); ``` -### `db.query.currentUserAgent` +### `db.query.currentIpAddress` -currentUserAgent +currentIpAddress - **Type:** query - **Arguments:** none ```typescript -const result = await db.query.currentUserAgent().execute(); +const result = await db.query.currentIpAddress().execute(); ``` ### `db.query.currentUserId` @@ -316,6 +316,21 @@ currentUserId const result = await db.query.currentUserId().execute(); ``` +### `db.query.requireStepUp` + +requireStepUp + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `stepUpType` | String | + +```typescript +const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); +``` + ### `db.query.currentUser` currentUser @@ -372,6 +387,51 @@ checkPassword const result = await db.mutation.checkPassword({ input: { password: '' } }).execute(); ``` +### `db.mutation.disconnectAccount` + +disconnectAccount + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DisconnectAccountInput (required) | + +```typescript +const result = await db.mutation.disconnectAccount({ input: { accountId: '' } }).execute(); +``` + +### `db.mutation.revokeApiKey` + +revokeApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeApiKeyInput (required) | + +```typescript +const result = await db.mutation.revokeApiKey({ input: { keyId: '' } }).execute(); +``` + +### `db.mutation.revokeSession` + +revokeSession + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeSessionInput (required) | + +```typescript +const result = await db.mutation.revokeSession({ input: { sessionId: '' } }).execute(); +``` + ### `db.mutation.verifyPassword` verifyPassword @@ -447,6 +507,21 @@ verifyEmail const result = await db.mutation.verifyEmail({ input: { emailId: '', token: '' } }).execute(); ``` +### `db.mutation.provisionNewUser` + +provisionNewUser + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionNewUserInput (required) | + +```typescript +const result = await db.mutation.provisionNewUser({ input: { email: '', password: '' } }).execute(); +``` + ### `db.mutation.resetPassword` resetPassword @@ -462,34 +537,34 @@ resetPassword const result = await db.mutation.resetPassword({ input: { roleId: '', resetToken: '', newPassword: '' } }).execute(); ``` -### `db.mutation.signInOneTimeToken` +### `db.mutation.createApiKey` -signInOneTimeToken +createApiKey - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInOneTimeTokenInput (required) | + | `input` | CreateApiKeyInput (required) | ```typescript -const result = await db.mutation.signInOneTimeToken({ input: { token: '', credentialKind: '' } }).execute(); +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }).execute(); ``` -### `db.mutation.signIn` +### `db.mutation.signInCrossOrigin` -signIn +signInCrossOrigin - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInInput (required) | + | `input` | SignInCrossOriginInput (required) | ```typescript -const result = await db.mutation.signIn({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.signInCrossOrigin({ input: { token: '', credentialKind: '' } }).execute(); ``` ### `db.mutation.signUp` @@ -507,19 +582,34 @@ signUp const result = await db.mutation.signUp({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); ``` -### `db.mutation.oneTimeToken` +### `db.mutation.requestCrossOriginToken` -oneTimeToken +requestCrossOriginToken - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | OneTimeTokenInput (required) | + | `input` | RequestCrossOriginTokenInput (required) | + +```typescript +const result = await db.mutation.requestCrossOriginToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +``` + +### `db.mutation.signIn` + +signIn + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | SignInInput (required) | ```typescript -const result = await db.mutation.oneTimeToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +const result = await db.mutation.signIn({ input: '' }).execute(); ``` ### `db.mutation.extendTokenExpires` diff --git a/sdk/constructive-sdk/src/auth/orm/index.ts b/sdk/constructive-sdk/src/auth/orm/index.ts index 3c0f903f5..d8c43241b 100644 --- a/sdk/constructive-sdk/src/auth/orm/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/index.ts @@ -8,9 +8,9 @@ import type { OrmClientConfig } from './client'; import { EmailModel } from './models/email'; import { PhoneNumberModel } from './models/phoneNumber'; import { CryptoAddressModel } from './models/cryptoAddress'; -import { ConnectedAccountModel } from './models/connectedAccount'; import { AuditLogModel } from './models/auditLog'; import { RoleTypeModel } from './models/roleType'; +import { UserConnectedAccountModel } from './models/userConnectedAccount'; import { UserModel } from './models/user'; import { createQueryOperations } from './query'; import { createMutationOperations } from './mutation'; @@ -50,9 +50,9 @@ export function createClient(config: OrmClientConfig) { email: new EmailModel(client), phoneNumber: new PhoneNumberModel(client), cryptoAddress: new CryptoAddressModel(client), - connectedAccount: new ConnectedAccountModel(client), auditLog: new AuditLogModel(client), roleType: new RoleTypeModel(client), + userConnectedAccount: new UserConnectedAccountModel(client), user: new UserModel(client), query: createQueryOperations(client), mutation: createMutationOperations(client), diff --git a/sdk/constructive-sdk/src/auth/orm/input-types.ts b/sdk/constructive-sdk/src/auth/orm/input-types.ts index 968dafb03..563c6ae79 100644 --- a/sdk/constructive-sdk/src/auth/orm/input-types.ts +++ b/sdk/constructive-sdk/src/auth/orm/input-types.ts @@ -276,21 +276,6 @@ export interface CryptoAddress { createdAt?: string | null; updatedAt?: string | null; } -/** OAuth and social login connections linking external service accounts to users */ -export interface ConnectedAccount { - id: string; - ownerId?: string | null; - /** The service used, e.g. `twitter` or `github`. */ - service?: string | null; - /** A unique identifier for the user within the service */ - identifier?: string | null; - /** Additional profile details extracted from this login method */ - details?: Record | null; - /** Whether this connected account has been verified */ - isVerified?: boolean | null; - createdAt?: string | null; - updatedAt?: string | null; -} /** Append-only audit log of authentication events (sign-in, sign-up, password changes, etc.) */ export interface AuditLog { id: string; @@ -313,6 +298,16 @@ export interface RoleType { id: number; name?: string | null; } +export interface UserConnectedAccount { + id: string; + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; + createdAt?: string | null; + updatedAt?: string | null; +} export interface User { id: string; username?: string | null; @@ -351,28 +346,26 @@ export interface PhoneNumberRelations { export interface CryptoAddressRelations { owner?: User | null; } -export interface ConnectedAccountRelations { - owner?: User | null; -} export interface AuditLogRelations { actor?: User | null; } export interface RoleTypeRelations {} +export interface UserConnectedAccountRelations {} export interface UserRelations { roleType?: RoleType | null; ownedEmails?: ConnectionResult; ownedPhoneNumbers?: ConnectionResult; ownedCryptoAddresses?: ConnectionResult; - ownedConnectedAccounts?: ConnectionResult; auditLogsByActorId?: ConnectionResult; } // ============ Entity Types With Relations ============ export type EmailWithRelations = Email & EmailRelations; export type PhoneNumberWithRelations = PhoneNumber & PhoneNumberRelations; export type CryptoAddressWithRelations = CryptoAddress & CryptoAddressRelations; -export type ConnectedAccountWithRelations = ConnectedAccount & ConnectedAccountRelations; export type AuditLogWithRelations = AuditLog & AuditLogRelations; export type RoleTypeWithRelations = RoleType & RoleTypeRelations; +export type UserConnectedAccountWithRelations = UserConnectedAccount & + UserConnectedAccountRelations; export type UserWithRelations = User & UserRelations; // ============ Entity Select Types ============ export type EmailSelect = { @@ -412,19 +405,6 @@ export type CryptoAddressSelect = { select: UserSelect; }; }; -export type ConnectedAccountSelect = { - id?: boolean; - ownerId?: boolean; - service?: boolean; - identifier?: boolean; - details?: boolean; - isVerified?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - owner?: { - select: UserSelect; - }; -}; export type AuditLogSelect = { id?: boolean; event?: boolean; @@ -442,6 +422,16 @@ export type RoleTypeSelect = { id?: boolean; name?: boolean; }; +export type UserConnectedAccountSelect = { + id?: boolean; + ownerId?: boolean; + service?: boolean; + identifier?: boolean; + details?: boolean; + isVerified?: boolean; + createdAt?: boolean; + updatedAt?: boolean; +}; export type UserSelect = { id?: boolean; username?: boolean; @@ -475,12 +465,6 @@ export type UserSelect = { filter?: CryptoAddressFilter; orderBy?: CryptoAddressOrderBy[]; }; - ownedConnectedAccounts?: { - select: ConnectedAccountSelect; - first?: number; - filter?: ConnectedAccountFilter; - orderBy?: ConnectedAccountOrderBy[]; - }; auditLogsByActorId?: { select: AuditLogSelect; first?: number; @@ -563,32 +547,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} export interface AuditLogFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -629,6 +587,30 @@ export interface RoleTypeFilter { /** Negates the expression. */ not?: RoleTypeFilter; } +export interface UserConnectedAccountFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `service` field. */ + service?: StringFilter; + /** Filter by the object’s `identifier` field. */ + identifier?: StringFilter; + /** Filter by the object’s `details` field. */ + details?: JSONFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: UserConnectedAccountFilter[]; + /** Checks for any expressions in this list. */ + or?: UserConnectedAccountFilter[]; + /** Negates the expression. */ + not?: UserConnectedAccountFilter; +} export interface UserFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -666,10 +648,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `auditLogsByActorId` relation. */ auditLogsByActorId?: UserToManyAuditLogFilter; /** `auditLogsByActorId` exist. */ @@ -743,26 +721,6 @@ export type CryptoAddressOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ConnectedAccountOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SERVICE_ASC' - | 'SERVICE_DESC' - | 'IDENTIFIER_ASC' - | 'IDENTIFIER_DESC' - | 'DETAILS_ASC' - | 'DETAILS_DESC' - | 'IS_VERIFIED_ASC' - | 'IS_VERIFIED_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type AuditLogOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -791,6 +749,24 @@ export type RoleTypeOrderBy = | 'ID_DESC' | 'NAME_ASC' | 'NAME_DESC'; +export type UserConnectedAccountOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SERVICE_ASC' + | 'SERVICE_DESC' + | 'IDENTIFIER_ASC' + | 'IDENTIFIER_DESC' + | 'DETAILS_ASC' + | 'DETAILS_DESC' + | 'IS_VERIFIED_ASC' + | 'IS_VERIFIED_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type UserOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -892,32 +868,6 @@ export interface DeleteCryptoAddressInput { clientMutationId?: string; id: string; } -export interface CreateConnectedAccountInput { - clientMutationId?: string; - connectedAccount: { - ownerId?: string; - service: string; - identifier: string; - details: Record; - isVerified?: boolean; - }; -} -export interface ConnectedAccountPatch { - ownerId?: string | null; - service?: string | null; - identifier?: string | null; - details?: Record | null; - isVerified?: boolean | null; -} -export interface UpdateConnectedAccountInput { - clientMutationId?: string; - id: string; - connectedAccountPatch: ConnectedAccountPatch; -} -export interface DeleteConnectedAccountInput { - clientMutationId?: string; - id: string; -} export interface CreateAuditLogInput { clientMutationId?: string; auditLog: { @@ -964,6 +914,32 @@ export interface DeleteRoleTypeInput { clientMutationId?: string; id: number; } +export interface CreateUserConnectedAccountInput { + clientMutationId?: string; + userConnectedAccount: { + ownerId?: string; + service?: string; + identifier?: string; + details?: Record; + isVerified?: boolean; + }; +} +export interface UserConnectedAccountPatch { + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; +} +export interface UpdateUserConnectedAccountInput { + clientMutationId?: string; + id: string; + userConnectedAccountPatch: UserConnectedAccountPatch; +} +export interface DeleteUserConnectedAccountInput { + clientMutationId?: string; + id: string; +} export interface CreateUserInput { clientMutationId?: string; user: { @@ -995,7 +971,6 @@ export const connectionFieldsMap = { ownedEmails: 'Email', ownedPhoneNumbers: 'PhoneNumber', ownedCryptoAddresses: 'CryptoAddress', - ownedConnectedAccounts: 'ConnectedAccount', auditLogsByActorId: 'AuditLog', }, } as Record>; @@ -1010,6 +985,18 @@ export interface CheckPasswordInput { clientMutationId?: string; password?: string; } +export interface DisconnectAccountInput { + clientMutationId?: string; + accountId: string; +} +export interface RevokeApiKeyInput { + clientMutationId?: string; + keyId: string; +} +export interface RevokeSessionInput { + clientMutationId?: string; + sessionId: string; +} export interface VerifyPasswordInput { clientMutationId?: string; password: string; @@ -1033,18 +1020,29 @@ export interface VerifyEmailInput { emailId?: string; token?: string; } +export interface ProvisionNewUserInput { + clientMutationId?: string; + email?: string; + password?: string; +} export interface ResetPasswordInput { clientMutationId?: string; roleId?: string; resetToken?: string; newPassword?: string; } -export interface SignInOneTimeTokenInput { +export interface CreateApiKeyInput { + clientMutationId?: string; + keyName: string; + accessLevel?: string; + mfaLevel?: string; +} +export interface SignInCrossOriginInput { clientMutationId?: string; token?: string; credentialKind?: string; } -export interface SignInInput { +export interface SignUpInput { clientMutationId?: string; email?: string; password?: string; @@ -1052,20 +1050,21 @@ export interface SignInInput { credentialKind?: string; csrfToken?: string; } -export interface SignUpInput { +export interface RequestCrossOriginTokenInput { clientMutationId?: string; email?: string; password?: string; + origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; - credentialKind?: string; - csrfToken?: string; } -export interface OneTimeTokenInput { +export interface SignInInput { clientMutationId?: string; email?: string; password?: string; - origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; + credentialKind?: string; + csrfToken?: string; + deviceToken?: string; } export interface ExtendTokenExpiresInput { clientMutationId?: string; @@ -1396,15 +1395,6 @@ export interface UserToManyCryptoAddressFilter { /** Filters to entities where no related entity matches. */ none?: CryptoAddressFilter; } -/** A filter to be used against many `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface UserToManyConnectedAccountFilter { - /** Filters to entities where at least one related entity matches. */ - some?: ConnectedAccountFilter; - /** Filters to entities where every related entity matches. */ - every?: ConnectedAccountFilter; - /** Filters to entities where no related entity matches. */ - none?: ConnectedAccountFilter; -} /** A filter to be used against many `AuditLog` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyAuditLogFilter { /** Filters to entities where at least one related entity matches. */ @@ -1517,33 +1507,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -/** A filter to be used against `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} /** A filter to be used against `AuditLog` object types. All fields are combined with a logical ‘and.’ */ export interface AuditLogFilter { /** Filter by the object’s `id` field. */ @@ -1686,10 +1649,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `auditLogsByActorId` relation. */ auditLogsByActorId?: UserToManyAuditLogFilter; /** `auditLogsByActorId` exist. */ @@ -1783,41 +1742,6 @@ export interface StringFilter { /** Greater than or equal to the specified value (case-insensitive). */ greaterThanOrEqualToInsensitive?: string; } -/** A filter to be used against JSON fields. All fields are combined with a logical ‘and.’ */ -export interface JSONFilter { - /** Is null (if `true` is specified) or is not null (if `false` is specified). */ - isNull?: boolean; - /** Equal to the specified value. */ - equalTo?: Record; - /** Not equal to the specified value. */ - notEqualTo?: Record; - /** Not equal to the specified value, treating null like an ordinary value. */ - distinctFrom?: Record; - /** Equal to the specified value, treating null like an ordinary value. */ - notDistinctFrom?: Record; - /** Included in the specified list. */ - in?: Record[]; - /** Not included in the specified list. */ - notIn?: Record[]; - /** Less than the specified value. */ - lessThan?: Record; - /** Less than or equal to the specified value. */ - lessThanOrEqualTo?: Record; - /** Greater than the specified value. */ - greaterThan?: Record; - /** Greater than or equal to the specified value. */ - greaterThanOrEqualTo?: Record; - /** Contains the specified JSON. */ - contains?: Record; - /** Contains the specified key. */ - containsKey?: string; - /** Contains all of the specified keys. */ - containsAllKeys?: string[]; - /** Contains any of the specified keys. */ - containsAnyKeys?: string[]; - /** Contained by the specified JSON. */ - containedBy?: Record; -} /** A filter to be used against InternetAddress fields. All fields are combined with a logical ‘and.’ */ export interface InternetAddressFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -1931,6 +1855,30 @@ export interface CheckPasswordPayload { export type CheckPasswordPayloadSelect = { clientMutationId?: boolean; }; +export interface DisconnectAccountPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DisconnectAccountPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeSessionPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeSessionPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface VerifyPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -1971,6 +1919,14 @@ export type VerifyEmailPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface ProvisionNewUserPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type ProvisionNewUserPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ResetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -1979,24 +1935,24 @@ export type ResetPasswordPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; -export interface SignInOneTimeTokenPayload { +export interface CreateApiKeyPayload { clientMutationId?: string | null; - result?: SignInOneTimeTokenRecord | null; + result?: CreateApiKeyRecord | null; } -export type SignInOneTimeTokenPayloadSelect = { +export type CreateApiKeyPayloadSelect = { clientMutationId?: boolean; result?: { - select: SignInOneTimeTokenRecordSelect; + select: CreateApiKeyRecordSelect; }; }; -export interface SignInPayload { +export interface SignInCrossOriginPayload { clientMutationId?: string | null; - result?: SignInRecord | null; + result?: SignInCrossOriginRecord | null; } -export type SignInPayloadSelect = { +export type SignInCrossOriginPayloadSelect = { clientMutationId?: boolean; result?: { - select: SignInRecordSelect; + select: SignInCrossOriginRecordSelect; }; }; export interface SignUpPayload { @@ -2009,14 +1965,24 @@ export type SignUpPayloadSelect = { select: SignUpRecordSelect; }; }; -export interface OneTimeTokenPayload { +export interface RequestCrossOriginTokenPayload { clientMutationId?: string | null; result?: string | null; } -export type OneTimeTokenPayloadSelect = { +export type RequestCrossOriginTokenPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SignInPayload { + clientMutationId?: string | null; + result?: SignInRecord | null; +} +export type SignInPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: SignInRecordSelect; + }; +}; export interface ExtendTokenExpiresPayload { clientMutationId?: string | null; result?: ExtendTokenExpiresRecord[] | null; @@ -2230,51 +2196,6 @@ export type DeleteCryptoAddressPayloadSelect = { select: CryptoAddressEdgeSelect; }; }; -export interface CreateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was created by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type CreateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface UpdateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was updated by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type UpdateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface DeleteConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was deleted by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type DeleteConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; export interface CreateAuditLogPayload { clientMutationId?: string | null; /** The `AuditLog` that was created by this mutation. */ @@ -2365,6 +2286,17 @@ export type DeleteRoleTypePayloadSelect = { select: RoleTypeEdgeSelect; }; }; +export interface CreateUserConnectedAccountPayload { + clientMutationId?: string | null; + /** The `UserConnectedAccount` that was created by this mutation. */ + userConnectedAccount?: UserConnectedAccount | null; +} +export type CreateUserConnectedAccountPayloadSelect = { + clientMutationId?: boolean; + userConnectedAccount?: { + select: UserConnectedAccountSelect; + }; +}; export interface CreateUserPayload { clientMutationId?: string | null; /** The `User` that was created by this mutation. */ @@ -2410,7 +2342,15 @@ export type DeleteUserPayloadSelect = { select: UserEdgeSelect; }; }; -export interface SignInOneTimeTokenRecord { +export interface CreateApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; +} +export type CreateApiKeyRecordSelect = { + apiKey?: boolean; + keyId?: boolean; +}; +export interface SignInCrossOriginRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -2418,7 +2358,7 @@ export interface SignInOneTimeTokenRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInOneTimeTokenRecordSelect = { +export type SignInCrossOriginRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -2426,7 +2366,7 @@ export type SignInOneTimeTokenRecordSelect = { isVerified?: boolean; totpEnabled?: boolean; }; -export interface SignInRecord { +export interface SignUpRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -2434,7 +2374,7 @@ export interface SignInRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInRecordSelect = { +export type SignUpRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -2442,21 +2382,25 @@ export type SignInRecordSelect = { isVerified?: boolean; totpEnabled?: boolean; }; -export interface SignUpRecord { +export interface SignInRecord { id?: string | null; userId?: string | null; accessToken?: string | null; accessTokenExpiresAt?: string | null; isVerified?: boolean | null; totpEnabled?: boolean | null; + mfaRequired?: boolean | null; + mfaChallengeToken?: string | null; } -export type SignUpRecordSelect = { +export type SignInRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; accessTokenExpiresAt?: boolean; isVerified?: boolean; totpEnabled?: boolean; + mfaRequired?: boolean; + mfaChallengeToken?: boolean; }; export interface ExtendTokenExpiresRecord { id?: string | null; @@ -2504,18 +2448,6 @@ export type CryptoAddressEdgeSelect = { select: CryptoAddressSelect; }; }; -/** A `ConnectedAccount` edge in the connection. */ -export interface ConnectedAccountEdge { - cursor?: string | null; - /** The `ConnectedAccount` at the end of the edge. */ - node?: ConnectedAccount | null; -} -export type ConnectedAccountEdgeSelect = { - cursor?: boolean; - node?: { - select: ConnectedAccountSelect; - }; -}; /** A `AuditLog` edge in the connection. */ export interface AuditLogEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/auth/orm/models/connectedAccount.ts b/sdk/constructive-sdk/src/auth/orm/models/connectedAccount.ts deleted file mode 100644 index c9def156d..000000000 --- a/sdk/constructive-sdk/src/auth/orm/models/connectedAccount.ts +++ /dev/null @@ -1,237 +0,0 @@ -/** - * ConnectedAccount model for ORM client - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { OrmClient } from '../client'; -import { - QueryBuilder, - buildFindManyDocument, - buildFindFirstDocument, - buildFindOneDocument, - buildCreateDocument, - buildUpdateByPkDocument, - buildDeleteByPkDocument, -} from '../query-builder'; -import type { - ConnectionResult, - FindManyArgs, - FindFirstArgs, - CreateArgs, - UpdateArgs, - DeleteArgs, - InferSelectResult, - StrictSelect, -} from '../select-types'; -import type { - ConnectedAccount, - ConnectedAccountWithRelations, - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy, - CreateConnectedAccountInput, - UpdateConnectedAccountInput, - ConnectedAccountPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class ConnectedAccountModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - connectedAccounts: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - first: args?.first, - last: args?.last, - after: args?.after, - before: args?.before, - offset: args?.offset, - }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - connectedAccounts: { - nodes: InferSelectResult[]; - }; - }> { - const { document, variables } = buildFindFirstDocument( - 'ConnectedAccount', - 'connectedAccounts', - args.select, - { - where: args?.where, - }, - 'ConnectedAccountFilter', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', - document, - variables, - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - connectedAccount: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccount', - document, - variables, - transform: (data: { - connectedAccounts?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - connectedAccount: data.connectedAccounts?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'ConnectedAccount', - 'createConnectedAccount', - 'connectedAccount', - args.select, - args.data, - 'CreateConnectedAccountInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'createConnectedAccount', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - ConnectedAccountPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'ConnectedAccount', - 'updateConnectedAccount', - 'connectedAccount', - args.select, - args.where.id, - args.data, - 'UpdateConnectedAccountInput', - 'id', - 'connectedAccountPatch', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'updateConnectedAccount', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'ConnectedAccount', - 'deleteConnectedAccount', - 'connectedAccount', - { - id: args.where.id, - }, - 'DeleteConnectedAccountInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'deleteConnectedAccount', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/auth/orm/models/index.ts b/sdk/constructive-sdk/src/auth/orm/models/index.ts index c21f0cd77..4e1b0adfe 100644 --- a/sdk/constructive-sdk/src/auth/orm/models/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/models/index.ts @@ -6,7 +6,7 @@ export { EmailModel } from './email'; export { PhoneNumberModel } from './phoneNumber'; export { CryptoAddressModel } from './cryptoAddress'; -export { ConnectedAccountModel } from './connectedAccount'; export { AuditLogModel } from './auditLog'; export { RoleTypeModel } from './roleType'; +export { UserConnectedAccountModel } from './userConnectedAccount'; export { UserModel } from './user'; diff --git a/sdk/constructive-sdk/src/auth/orm/models/userConnectedAccount.ts b/sdk/constructive-sdk/src/auth/orm/models/userConnectedAccount.ts new file mode 100644 index 000000000..45bbea7f4 --- /dev/null +++ b/sdk/constructive-sdk/src/auth/orm/models/userConnectedAccount.ts @@ -0,0 +1,169 @@ +/** + * UserConnectedAccount model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + UserConnectedAccount, + UserConnectedAccountWithRelations, + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, + CreateUserConnectedAccountInput, + UpdateUserConnectedAccountInput, + UserConnectedAccountPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserConnectedAccountModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + }, + 'UserConnectedAccountFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccount: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccount', + document, + variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserConnectedAccount: { + userConnectedAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserConnectedAccount', + 'createUserConnectedAccount', + 'userConnectedAccount', + args.select, + args.data, + 'CreateUserConnectedAccountInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserConnectedAccount', + fieldName: 'createUserConnectedAccount', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/auth/orm/mutation/index.ts b/sdk/constructive-sdk/src/auth/orm/mutation/index.ts index d3e0d4862..c8f543ad7 100644 --- a/sdk/constructive-sdk/src/auth/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/mutation/index.ts @@ -10,16 +10,21 @@ import type { SignOutInput, SendAccountDeletionEmailInput, CheckPasswordInput, + DisconnectAccountInput, + RevokeApiKeyInput, + RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, ConfirmDeleteAccountInput, SetPasswordInput, VerifyEmailInput, + ProvisionNewUserInput, ResetPasswordInput, - SignInOneTimeTokenInput, - SignInInput, + CreateApiKeyInput, + SignInCrossOriginInput, SignUpInput, - OneTimeTokenInput, + RequestCrossOriginTokenInput, + SignInInput, ExtendTokenExpiresInput, ForgotPasswordInput, SendVerificationEmailInput, @@ -29,16 +34,21 @@ import type { SignOutPayload, SendAccountDeletionEmailPayload, CheckPasswordPayload, + DisconnectAccountPayload, + RevokeApiKeyPayload, + RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, ConfirmDeleteAccountPayload, SetPasswordPayload, VerifyEmailPayload, + ProvisionNewUserPayload, ResetPasswordPayload, - SignInOneTimeTokenPayload, - SignInPayload, + CreateApiKeyPayload, + SignInCrossOriginPayload, SignUpPayload, - OneTimeTokenPayload, + RequestCrossOriginTokenPayload, + SignInPayload, ExtendTokenExpiresPayload, ForgotPasswordPayload, SendVerificationEmailPayload, @@ -48,16 +58,21 @@ import type { SignOutPayloadSelect, SendAccountDeletionEmailPayloadSelect, CheckPasswordPayloadSelect, + DisconnectAccountPayloadSelect, + RevokeApiKeyPayloadSelect, + RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, ConfirmDeleteAccountPayloadSelect, SetPasswordPayloadSelect, VerifyEmailPayloadSelect, + ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, - SignInOneTimeTokenPayloadSelect, - SignInPayloadSelect, + CreateApiKeyPayloadSelect, + SignInCrossOriginPayloadSelect, SignUpPayloadSelect, - OneTimeTokenPayloadSelect, + RequestCrossOriginTokenPayloadSelect, + SignInPayloadSelect, ExtendTokenExpiresPayloadSelect, ForgotPasswordPayloadSelect, SendVerificationEmailPayloadSelect, @@ -75,6 +90,15 @@ export interface SendAccountDeletionEmailVariables { export interface CheckPasswordVariables { input: CheckPasswordInput; } +export interface DisconnectAccountVariables { + input: DisconnectAccountInput; +} +export interface RevokeApiKeyVariables { + input: RevokeApiKeyInput; +} +export interface RevokeSessionVariables { + input: RevokeSessionInput; +} export interface VerifyPasswordVariables { input: VerifyPasswordInput; } @@ -90,20 +114,26 @@ export interface SetPasswordVariables { export interface VerifyEmailVariables { input: VerifyEmailInput; } +export interface ProvisionNewUserVariables { + input: ProvisionNewUserInput; +} export interface ResetPasswordVariables { input: ResetPasswordInput; } -export interface SignInOneTimeTokenVariables { - input: SignInOneTimeTokenInput; +export interface CreateApiKeyVariables { + input: CreateApiKeyInput; } -export interface SignInVariables { - input: SignInInput; +export interface SignInCrossOriginVariables { + input: SignInCrossOriginInput; } export interface SignUpVariables { input: SignUpInput; } -export interface OneTimeTokenVariables { - input: OneTimeTokenInput; +export interface RequestCrossOriginTokenVariables { + input: RequestCrossOriginTokenInput; +} +export interface SignInVariables { + input: SignInInput; } export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; @@ -232,6 +262,93 @@ export function createMutationOperations(client: OrmClient) { 'CheckPasswordPayload' ), }), + disconnectAccount: ( + args: DisconnectAccountVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + disconnectAccount: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'DisconnectAccount', + fieldName: 'disconnectAccount', + ...buildCustomDocument( + 'mutation', + 'DisconnectAccount', + 'disconnectAccount', + options.select, + args, + [ + { + name: 'input', + type: 'DisconnectAccountInput!', + }, + ], + connectionFieldsMap, + 'DisconnectAccountPayload' + ), + }), + revokeApiKey: ( + args: RevokeApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeApiKey', + fieldName: 'revokeApiKey', + ...buildCustomDocument( + 'mutation', + 'RevokeApiKey', + 'revokeApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeApiKeyInput!', + }, + ], + connectionFieldsMap, + 'RevokeApiKeyPayload' + ), + }), + revokeSession: ( + args: RevokeSessionVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeSession: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeSession', + fieldName: 'revokeSession', + ...buildCustomDocument( + 'mutation', + 'RevokeSession', + 'revokeSession', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeSessionInput!', + }, + ], + connectionFieldsMap, + 'RevokeSessionPayload' + ), + }), verifyPassword: ( args: VerifyPasswordVariables, options: { @@ -377,6 +494,35 @@ export function createMutationOperations(client: OrmClient) { 'VerifyEmailPayload' ), }), + provisionNewUser: ( + args: ProvisionNewUserVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + provisionNewUser: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ProvisionNewUser', + fieldName: 'provisionNewUser', + ...buildCustomDocument( + 'mutation', + 'ProvisionNewUser', + 'provisionNewUser', + options.select, + args, + [ + { + name: 'input', + type: 'ProvisionNewUserInput!', + }, + ], + connectionFieldsMap, + 'ProvisionNewUserPayload' + ), + }), resetPassword: ( args: ResetPasswordVariables, options: { @@ -406,62 +552,62 @@ export function createMutationOperations(client: OrmClient) { 'ResetPasswordPayload' ), }), - signInOneTimeToken: ( - args: SignInOneTimeTokenVariables, + createApiKey: ( + args: CreateApiKeyVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signInOneTimeToken: InferSelectResult | null; + createApiKey: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignInOneTimeToken', - fieldName: 'signInOneTimeToken', + operationName: 'CreateApiKey', + fieldName: 'createApiKey', ...buildCustomDocument( 'mutation', - 'SignInOneTimeToken', - 'signInOneTimeToken', + 'CreateApiKey', + 'createApiKey', options.select, args, [ { name: 'input', - type: 'SignInOneTimeTokenInput!', + type: 'CreateApiKeyInput!', }, ], connectionFieldsMap, - 'SignInOneTimeTokenPayload' + 'CreateApiKeyPayload' ), }), - signIn: ( - args: SignInVariables, + signInCrossOrigin: ( + args: SignInCrossOriginVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signIn: InferSelectResult | null; + signInCrossOrigin: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignIn', - fieldName: 'signIn', + operationName: 'SignInCrossOrigin', + fieldName: 'signInCrossOrigin', ...buildCustomDocument( 'mutation', - 'SignIn', - 'signIn', + 'SignInCrossOrigin', + 'signInCrossOrigin', options.select, args, [ { name: 'input', - type: 'SignInInput!', + type: 'SignInCrossOriginInput!', }, ], connectionFieldsMap, - 'SignInPayload' + 'SignInCrossOriginPayload' ), }), signUp: ( @@ -493,33 +639,62 @@ export function createMutationOperations(client: OrmClient) { 'SignUpPayload' ), }), - oneTimeToken: ( - args: OneTimeTokenVariables, + requestCrossOriginToken: ( + args: RequestCrossOriginTokenVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + requestCrossOriginToken: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RequestCrossOriginToken', + fieldName: 'requestCrossOriginToken', + ...buildCustomDocument( + 'mutation', + 'RequestCrossOriginToken', + 'requestCrossOriginToken', + options.select, + args, + [ + { + name: 'input', + type: 'RequestCrossOriginTokenInput!', + }, + ], + connectionFieldsMap, + 'RequestCrossOriginTokenPayload' + ), + }), + signIn: ( + args: SignInVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - oneTimeToken: InferSelectResult | null; + signIn: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'OneTimeToken', - fieldName: 'oneTimeToken', + operationName: 'SignIn', + fieldName: 'signIn', ...buildCustomDocument( 'mutation', - 'OneTimeToken', - 'oneTimeToken', + 'SignIn', + 'signIn', options.select, args, [ { name: 'input', - type: 'OneTimeTokenInput!', + type: 'SignInInput!', }, ], connectionFieldsMap, - 'OneTimeTokenPayload' + 'SignInPayload' ), }), extendTokenExpires: ( diff --git a/sdk/constructive-sdk/src/auth/orm/query/index.ts b/sdk/constructive-sdk/src/auth/orm/query/index.ts index 69150c6c7..408632294 100644 --- a/sdk/constructive-sdk/src/auth/orm/query/index.ts +++ b/sdk/constructive-sdk/src/auth/orm/query/index.ts @@ -8,20 +8,23 @@ import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; import type { User, UserSelect } from '../input-types'; import { connectionFieldsMap } from '../input-types'; +export interface RequireStepUpVariables { + stepUpType?: string; +} export function createQueryOperations(client: OrmClient) { return { - currentIpAddress: (options?: { select?: Record }) => + currentUserAgent: (options?: { select?: Record }) => new QueryBuilder<{ - currentIpAddress: string | null; + currentUserAgent: string | null; }>({ client, operation: 'query', - operationName: 'CurrentIpAddress', - fieldName: 'currentIpAddress', + operationName: 'CurrentUserAgent', + fieldName: 'currentUserAgent', ...buildCustomDocument( 'query', - 'CurrentIpAddress', - 'currentIpAddress', + 'CurrentUserAgent', + 'currentUserAgent', options?.select, undefined, [], @@ -29,18 +32,18 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentUserAgent: (options?: { select?: Record }) => + currentIpAddress: (options?: { select?: Record }) => new QueryBuilder<{ - currentUserAgent: string | null; + currentIpAddress: string | null; }>({ client, operation: 'query', - operationName: 'CurrentUserAgent', - fieldName: 'currentUserAgent', + operationName: 'CurrentIpAddress', + fieldName: 'currentIpAddress', ...buildCustomDocument( 'query', - 'CurrentUserAgent', - 'currentUserAgent', + 'CurrentIpAddress', + 'currentIpAddress', options?.select, undefined, [], @@ -67,6 +70,35 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + requireStepUp: ( + args: RequireStepUpVariables, + options?: { + select?: Record; + } + ) => + new QueryBuilder<{ + requireStepUp: boolean | null; + }>({ + client, + operation: 'query', + operationName: 'RequireStepUp', + fieldName: 'requireStepUp', + ...buildCustomDocument( + 'query', + 'RequireStepUp', + 'requireStepUp', + options?.select, + args, + [ + { + name: 'stepUpType', + type: 'String', + }, + ], + connectionFieldsMap, + undefined + ), + }), currentUser: ( options: { select: S; diff --git a/sdk/constructive-sdk/src/public/README.md b/sdk/constructive-sdk/src/public/README.md index 7b7f12fca..297db1a00 100644 --- a/sdk/constructive-sdk/src/public/README.md +++ b/sdk/constructive-sdk/src/public/README.md @@ -8,9 +8,9 @@ ## Overview -- **Tables:** 109 -- **Custom queries:** 20 -- **Custom mutations:** 44 +- **Tables:** 114 +- **Custom queries:** 22 +- **Custom mutations:** 50 **Generators:** ORM diff --git a/sdk/constructive-sdk/src/public/orm/README.md b/sdk/constructive-sdk/src/public/orm/README.md index 9129a2618..752e931ea 100644 --- a/sdk/constructive-sdk/src/public/orm/README.md +++ b/sdk/constructive-sdk/src/public/orm/README.md @@ -33,6 +33,7 @@ const db = createClient({ | `table` | findMany, findOne, create, update, delete | | `checkConstraint` | findMany, findOne, create, update, delete | | `field` | findMany, findOne, create, update, delete | +| `spatialRelation` | findMany, findOne, create, update, delete | | `foreignKeyConstraint` | findMany, findOne, create, update, delete | | `fullTextSearch` | findMany, findOne, create, update, delete | | `index` | findMany, findOne, create, update, delete | @@ -46,9 +47,9 @@ const db = createClient({ | `viewGrant` | findMany, findOne, create, update, delete | | `viewRule` | findMany, findOne, create, update, delete | | `embeddingChunk` | findMany, findOne, create, update, delete | -| `tableTemplateModule` | findMany, findOne, create, update, delete | | `secureTableProvision` | findMany, findOne, create, update, delete | | `relationProvision` | findMany, findOne, create, update, delete | +| `sessionSecretsModule` | findMany, findOne, create, update, delete | | `schemaGrant` | findMany, findOne, create, update, delete | | `defaultPrivilege` | findMany, findOne, create, update, delete | | `enum` | findMany, findOne, create, update, delete | @@ -86,6 +87,8 @@ const db = createClient({ | `blueprintTemplate` | findMany, findOne, create, update, delete | | `blueprintConstruction` | findMany, findOne, create, update, delete | | `storageModule` | findMany, findOne, create, update, delete | +| `entityTypeProvision` | findMany, findOne, create, update, delete | +| `webauthnCredentialsModule` | findMany, findOne, create, update, delete | | `databaseProvisionModule` | findMany, findOne, create, update, delete | | `appAdminGrant` | findMany, findOne, create, update, delete | | `appOwnerGrant` | findMany, findOne, create, update, delete | @@ -94,6 +97,7 @@ const db = createClient({ | `orgMember` | findMany, findOne, create, update, delete | | `orgAdminGrant` | findMany, findOne, create, update, delete | | `orgOwnerGrant` | findMany, findOne, create, update, delete | +| `orgMemberProfile` | findMany, findOne, create, update, delete | | `orgGrant` | findMany, findOne, create, update, delete | | `orgChartEdge` | findMany, findOne, create, update, delete | | `orgChartEdgeGrant` | findMany, findOne, create, update, delete | @@ -106,7 +110,6 @@ const db = createClient({ | `email` | findMany, findOne, create, update, delete | | `phoneNumber` | findMany, findOne, create, update, delete | | `cryptoAddress` | findMany, findOne, create, update, delete | -| `connectedAccount` | findMany, findOne, create, update, delete | | `appInvite` | findMany, findOne, create, update, delete | | `appClaimedInvite` | findMany, findOne, create, update, delete | | `orgInvite` | findMany, findOne, create, update, delete | @@ -119,10 +122,12 @@ const db = createClient({ | `migrateFile` | findMany, findOne, create, update, delete | | `appLimitDefault` | findMany, findOne, create, update, delete | | `orgLimitDefault` | findMany, findOne, create, update, delete | -| `membershipType` | findMany, findOne, create, update, delete | +| `devicesModule` | findMany, findOne, create, update, delete | +| `userConnectedAccount` | findMany, findOne, create, update, delete | | `appMembershipDefault` | findMany, findOne, create, update, delete | | `commit` | findMany, findOne, create, update, delete | | `rateLimitsModule` | findMany, findOne, create, update, delete | +| `membershipType` | findMany, findOne, create, update, delete | | `orgMembershipDefault` | findMany, findOne, create, update, delete | | `rlsModule` | findMany, findOne, create, update, delete | | `sqlAction` | findMany, findOne, create, update, delete | @@ -580,6 +585,49 @@ const updated = await db.field.update({ where: { id: '' }, data: { databas const deleted = await db.field.delete({ where: { id: '' } }).execute(); ``` +### `db.spatialRelation` + +CRUD operations for SpatialRelation records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `fieldId` | UUID | Yes | +| `refTableId` | UUID | Yes | +| `refFieldId` | UUID | Yes | +| `name` | String | Yes | +| `operator` | String | Yes | +| `paramName` | String | Yes | +| `category` | ObjectCategory | Yes | +| `module` | String | Yes | +| `scope` | Int | Yes | +| `tags` | String | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all spatialRelation records +const items = await db.spatialRelation.findMany({ select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.spatialRelation.findOne({ id: '', select: { id: true, databaseId: true, tableId: true, fieldId: true, refTableId: true, refFieldId: true, name: true, operator: true, paramName: true, category: true, module: true, scope: true, tags: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.spatialRelation.create({ data: { databaseId: '', tableId: '', fieldId: '', refTableId: '', refFieldId: '', name: '', operator: '', paramName: '', category: '', module: '', scope: '', tags: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.spatialRelation.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.spatialRelation.delete({ where: { id: '' } }).execute(); +``` + ### `db.foreignKeyConstraint` CRUD operations for ForeignKeyConstraint records. @@ -1107,43 +1155,6 @@ const updated = await db.embeddingChunk.update({ where: { id: '' }, data: const deleted = await db.embeddingChunk.delete({ where: { id: '' } }).execute(); ``` -### `db.tableTemplateModule` - -CRUD operations for TableTemplateModule records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | UUID | No | -| `databaseId` | UUID | Yes | -| `schemaId` | UUID | Yes | -| `privateSchemaId` | UUID | Yes | -| `tableId` | UUID | Yes | -| `ownerTableId` | UUID | Yes | -| `tableName` | String | Yes | -| `nodeType` | String | Yes | -| `data` | JSON | Yes | - -**Operations:** - -```typescript -// List all tableTemplateModule records -const items = await db.tableTemplateModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true, nodeType: true, data: true } }).execute(); - -// Get one by id -const item = await db.tableTemplateModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true, nodeType: true, data: true } }).execute(); - -// Create -const created = await db.tableTemplateModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '', nodeType: '', data: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.tableTemplateModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.tableTemplateModule.delete({ where: { id: '' } }).execute(); -``` - ### `db.secureTableProvision` CRUD operations for SecureTableProvision records. @@ -1247,6 +1258,40 @@ const updated = await db.relationProvision.update({ where: { id: '' }, dat const deleted = await db.relationProvision.delete({ where: { id: '' } }).execute(); ``` +### `db.sessionSecretsModule` + +CRUD operations for SessionSecretsModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `tableName` | String | Yes | +| `sessionsTableId` | UUID | Yes | + +**Operations:** + +```typescript +// List all sessionSecretsModule records +const items = await db.sessionSecretsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } }).execute(); + +// Get one by id +const item = await db.sessionSecretsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, tableId: true, tableName: true, sessionsTableId: true } }).execute(); + +// Create +const created = await db.sessionSecretsModule.create({ data: { databaseId: '', schemaId: '', tableId: '', tableName: '', sessionsTableId: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.sessionSecretsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.sessionSecretsModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.schemaGrant` CRUD operations for SchemaGrant records. @@ -2204,18 +2249,19 @@ CRUD operations for MembershipsModule records. | `entityIdsByMask` | String | Yes | | `entityIdsByPerm` | String | Yes | | `entityIdsFunction` | String | Yes | +| `memberProfilesTableId` | UUID | Yes | **Operations:** ```typescript // List all membershipsModule records -const items = await db.membershipsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } }).execute(); +const items = await db.membershipsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } }).execute(); // Get one by id -const item = await db.membershipsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true } }).execute(); +const item = await db.membershipsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, membershipsTableId: true, membershipsTableName: true, membersTableId: true, membersTableName: true, membershipDefaultsTableId: true, membershipDefaultsTableName: true, grantsTableId: true, grantsTableName: true, actorTableId: true, limitsTableId: true, defaultLimitsTableId: true, permissionsTableId: true, defaultPermissionsTableId: true, sprtTableId: true, adminGrantsTableId: true, adminGrantsTableName: true, ownerGrantsTableId: true, ownerGrantsTableName: true, membershipType: true, entityTableId: true, entityTableOwnerId: true, prefix: true, actorMaskCheck: true, actorPermCheck: true, entityIdsByMask: true, entityIdsByPerm: true, entityIdsFunction: true, memberProfilesTableId: true } }).execute(); // Create -const created = await db.membershipsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '' }, select: { id: true } }).execute(); +const created = await db.membershipsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', membershipsTableId: '', membershipsTableName: '', membersTableId: '', membersTableName: '', membershipDefaultsTableId: '', membershipDefaultsTableName: '', grantsTableId: '', grantsTableName: '', actorTableId: '', limitsTableId: '', defaultLimitsTableId: '', permissionsTableId: '', defaultPermissionsTableId: '', sprtTableId: '', adminGrantsTableId: '', adminGrantsTableName: '', ownerGrantsTableId: '', ownerGrantsTableName: '', membershipType: '', entityTableId: '', entityTableOwnerId: '', prefix: '', actorMaskCheck: '', actorPermCheck: '', entityIdsByMask: '', entityIdsByPerm: '', entityIdsFunction: '', memberProfilesTableId: '' }, select: { id: true } }).execute(); // Update const updated = await db.membershipsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -2453,21 +2499,21 @@ CRUD operations for UserAuthModule records. | `checkPasswordFunction` | String | Yes | | `sendAccountDeletionEmailFunction` | String | Yes | | `deleteAccountFunction` | String | Yes | -| `signInOneTimeTokenFunction` | String | Yes | -| `oneTimeTokenFunction` | String | Yes | +| `signInCrossOriginFunction` | String | Yes | +| `requestCrossOriginTokenFunction` | String | Yes | | `extendTokenExpires` | String | Yes | **Operations:** ```typescript // List all userAuthModule records -const items = await db.userAuthModule.findMany({ select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } }).execute(); +const items = await db.userAuthModule.findMany({ select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } }).execute(); // Get one by id -const item = await db.userAuthModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInOneTimeTokenFunction: true, oneTimeTokenFunction: true, extendTokenExpires: true } }).execute(); +const item = await db.userAuthModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, emailsTableId: true, usersTableId: true, secretsTableId: true, encryptedTableId: true, sessionsTableId: true, sessionCredentialsTableId: true, auditsTableId: true, auditsTableName: true, signInFunction: true, signUpFunction: true, signOutFunction: true, setPasswordFunction: true, resetPasswordFunction: true, forgotPasswordFunction: true, sendVerificationEmailFunction: true, verifyEmailFunction: true, verifyPasswordFunction: true, checkPasswordFunction: true, sendAccountDeletionEmailFunction: true, deleteAccountFunction: true, signInCrossOriginFunction: true, requestCrossOriginTokenFunction: true, extendTokenExpires: true } }).execute(); // Create -const created = await db.userAuthModule.create({ data: { databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInOneTimeTokenFunction: '', oneTimeTokenFunction: '', extendTokenExpires: '' }, select: { id: true } }).execute(); +const created = await db.userAuthModule.create({ data: { databaseId: '', schemaId: '', emailsTableId: '', usersTableId: '', secretsTableId: '', encryptedTableId: '', sessionsTableId: '', sessionCredentialsTableId: '', auditsTableId: '', auditsTableName: '', signInFunction: '', signUpFunction: '', signOutFunction: '', setPasswordFunction: '', resetPasswordFunction: '', forgotPasswordFunction: '', sendVerificationEmailFunction: '', verifyEmailFunction: '', verifyPasswordFunction: '', checkPasswordFunction: '', sendAccountDeletionEmailFunction: '', deleteAccountFunction: '', signInCrossOriginFunction: '', requestCrossOriginTokenFunction: '', extendTokenExpires: '' }, select: { id: true } }).execute(); // Update const updated = await db.userAuthModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); @@ -2686,6 +2732,86 @@ const updated = await db.storageModule.update({ where: { id: '' }, data: { const deleted = await db.storageModule.delete({ where: { id: '' } }).execute(); ``` +### `db.entityTypeProvision` + +CRUD operations for EntityTypeProvision records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `name` | String | Yes | +| `prefix` | String | Yes | +| `description` | String | Yes | +| `parentEntity` | String | Yes | +| `tableName` | String | Yes | +| `isVisible` | Boolean | Yes | +| `hasLimits` | Boolean | Yes | +| `hasProfiles` | Boolean | Yes | +| `hasLevels` | Boolean | Yes | +| `skipEntityPolicies` | Boolean | Yes | +| `tableProvision` | JSON | Yes | +| `outMembershipType` | Int | Yes | +| `outEntityTableId` | UUID | Yes | +| `outEntityTableName` | String | Yes | +| `outInstalledModules` | String | Yes | + +**Operations:** + +```typescript +// List all entityTypeProvision records +const items = await db.entityTypeProvision.findMany({ select: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } }).execute(); + +// Get one by id +const item = await db.entityTypeProvision.findOne({ id: '', select: { id: true, databaseId: true, name: true, prefix: true, description: true, parentEntity: true, tableName: true, isVisible: true, hasLimits: true, hasProfiles: true, hasLevels: true, skipEntityPolicies: true, tableProvision: true, outMembershipType: true, outEntityTableId: true, outEntityTableName: true, outInstalledModules: true } }).execute(); + +// Create +const created = await db.entityTypeProvision.create({ data: { databaseId: '', name: '', prefix: '', description: '', parentEntity: '', tableName: '', isVisible: '', hasLimits: '', hasProfiles: '', hasLevels: '', skipEntityPolicies: '', tableProvision: '', outMembershipType: '', outEntityTableId: '', outEntityTableName: '', outInstalledModules: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.entityTypeProvision.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.entityTypeProvision.delete({ where: { id: '' } }).execute(); +``` + +### `db.webauthnCredentialsModule` + +CRUD operations for WebauthnCredentialsModule records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `privateSchemaId` | UUID | Yes | +| `tableId` | UUID | Yes | +| `ownerTableId` | UUID | Yes | +| `tableName` | String | Yes | + +**Operations:** + +```typescript +// List all webauthnCredentialsModule records +const items = await db.webauthnCredentialsModule.findMany({ select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } }).execute(); + +// Get one by id +const item = await db.webauthnCredentialsModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, privateSchemaId: true, tableId: true, ownerTableId: true, tableName: true } }).execute(); + +// Create +const created = await db.webauthnCredentialsModule.create({ data: { databaseId: '', schemaId: '', privateSchemaId: '', tableId: '', ownerTableId: '', tableName: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.webauthnCredentialsModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.webauthnCredentialsModule.delete({ where: { id: '' } }).execute(); +``` + ### `db.databaseProvisionModule` CRUD operations for DatabaseProvisionModule records. @@ -2848,25 +2974,27 @@ CRUD operations for OrgMembership records. | `isBanned` | Boolean | Yes | | `isDisabled` | Boolean | Yes | | `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isAdmin` | Boolean | Yes | | `permissions` | BitString | Yes | | `granted` | BitString | Yes | | `actorId` | UUID | Yes | | `entityId` | UUID | Yes | +| `isReadOnly` | Boolean | Yes | | `profileId` | UUID | Yes | **Operations:** ```typescript // List all orgMembership records -const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +const items = await db.orgMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Get one by id -const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, profileId: true } }).execute(); +const item = await db.orgMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, entityId: true, isReadOnly: true, profileId: true } }).execute(); // Create -const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.orgMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', entityId: '', isReadOnly: '', profileId: '' }, select: { id: true } }).execute(); // Update const updated = await db.orgMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); @@ -2977,6 +3105,45 @@ const updated = await db.orgOwnerGrant.update({ where: { id: '' }, data: { const deleted = await db.orgOwnerGrant.delete({ where: { id: '' } }).execute(); ``` +### `db.orgMemberProfile` + +CRUD operations for OrgMemberProfile records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | +| `membershipId` | UUID | Yes | +| `entityId` | UUID | Yes | +| `actorId` | UUID | Yes | +| `displayName` | String | Yes | +| `email` | String | Yes | +| `title` | String | Yes | +| `bio` | String | Yes | +| `profilePicture` | ConstructiveInternalTypeImage | Yes | + +**Operations:** + +```typescript +// List all orgMemberProfile records +const items = await db.orgMemberProfile.findMany({ select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Get one by id +const item = await db.orgMemberProfile.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, membershipId: true, entityId: true, actorId: true, displayName: true, email: true, title: true, bio: true, profilePicture: true } }).execute(); + +// Create +const created = await db.orgMemberProfile.create({ data: { membershipId: '', entityId: '', actorId: '', displayName: '', email: '', title: '', bio: '', profilePicture: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.orgMemberProfile.update({ where: { id: '' }, data: { membershipId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.orgMemberProfile.delete({ where: { id: '' } }).execute(); +``` + ### `db.orgGrant` CRUD operations for OrgGrant records. @@ -3393,42 +3560,6 @@ const updated = await db.cryptoAddress.update({ where: { id: '' }, data: { const deleted = await db.cryptoAddress.delete({ where: { id: '' } }).execute(); ``` -### `db.connectedAccount` - -CRUD operations for ConnectedAccount records. - -**Fields:** - -| Field | Type | Editable | -|-------|------|----------| -| `id` | UUID | No | -| `ownerId` | UUID | Yes | -| `service` | String | Yes | -| `identifier` | String | Yes | -| `details` | JSON | Yes | -| `isVerified` | Boolean | Yes | -| `createdAt` | Datetime | No | -| `updatedAt` | Datetime | No | - -**Operations:** - -```typescript -// List all connectedAccount records -const items = await db.connectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Get one by id -const item = await db.connectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); - -// Create -const created = await db.connectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); - -// Update -const updated = await db.connectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); - -// Delete -const deleted = await db.connectedAccount.delete({ where: { id: '' } }).execute(); -``` - ### `db.appInvite` CRUD operations for AppInvite records. @@ -3835,36 +3966,75 @@ const updated = await db.orgLimitDefault.update({ where: { id: '' }, data: const deleted = await db.orgLimitDefault.delete({ where: { id: '' } }).execute(); ``` -### `db.membershipType` +### `db.devicesModule` -CRUD operations for MembershipType records. +CRUD operations for DevicesModule records. **Fields:** | Field | Type | Editable | |-------|------|----------| -| `id` | Int | No | -| `name` | String | Yes | -| `description` | String | Yes | -| `prefix` | String | Yes | +| `id` | UUID | No | +| `databaseId` | UUID | Yes | +| `schemaId` | UUID | Yes | +| `userDevicesTableId` | UUID | Yes | +| `deviceSettingsTableId` | UUID | Yes | +| `userDevicesTable` | String | Yes | +| `deviceSettingsTable` | String | Yes | **Operations:** ```typescript -// List all membershipType records -const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true } }).execute(); +// List all devicesModule records +const items = await db.devicesModule.findMany({ select: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } }).execute(); // Get one by id -const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true } }).execute(); +const item = await db.devicesModule.findOne({ id: '', select: { id: true, databaseId: true, schemaId: true, userDevicesTableId: true, deviceSettingsTableId: true, userDevicesTable: true, deviceSettingsTable: true } }).execute(); // Create -const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '' }, select: { id: true } }).execute(); +const created = await db.devicesModule.create({ data: { databaseId: '', schemaId: '', userDevicesTableId: '', deviceSettingsTableId: '', userDevicesTable: '', deviceSettingsTable: '' }, select: { id: true } }).execute(); // Update -const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); +const updated = await db.devicesModule.update({ where: { id: '' }, data: { databaseId: '' }, select: { id: true } }).execute(); // Delete -const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); +const deleted = await db.devicesModule.delete({ where: { id: '' } }).execute(); +``` + +### `db.userConnectedAccount` + +CRUD operations for UserConnectedAccount records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | UUID | No | +| `ownerId` | UUID | Yes | +| `service` | String | Yes | +| `identifier` | String | Yes | +| `details` | JSON | Yes | +| `isVerified` | Boolean | Yes | +| `createdAt` | Datetime | No | +| `updatedAt` | Datetime | No | + +**Operations:** + +```typescript +// List all userConnectedAccount records +const items = await db.userConnectedAccount.findMany({ select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Get one by id +const item = await db.userConnectedAccount.findOne({ id: '', select: { id: true, ownerId: true, service: true, identifier: true, details: true, isVerified: true, createdAt: true, updatedAt: true } }).execute(); + +// Create +const created = await db.userConnectedAccount.create({ data: { ownerId: '', service: '', identifier: '', details: '', isVerified: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.userConnectedAccount.update({ where: { id: '' }, data: { ownerId: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.userConnectedAccount.delete({ where: { id: '' } }).execute(); ``` ### `db.appMembershipDefault` @@ -3976,6 +4146,40 @@ const updated = await db.rateLimitsModule.update({ where: { id: '' }, data const deleted = await db.rateLimitsModule.delete({ where: { id: '' } }).execute(); ``` +### `db.membershipType` + +CRUD operations for MembershipType records. + +**Fields:** + +| Field | Type | Editable | +|-------|------|----------| +| `id` | Int | No | +| `name` | String | Yes | +| `description` | String | Yes | +| `prefix` | String | Yes | +| `parentMembershipType` | Int | Yes | +| `hasUsersTableEntry` | Boolean | Yes | + +**Operations:** + +```typescript +// List all membershipType records +const items = await db.membershipType.findMany({ select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Get one by id +const item = await db.membershipType.findOne({ id: '', select: { id: true, name: true, description: true, prefix: true, parentMembershipType: true, hasUsersTableEntry: true } }).execute(); + +// Create +const created = await db.membershipType.create({ data: { name: '', description: '', prefix: '', parentMembershipType: '', hasUsersTableEntry: '' }, select: { id: true } }).execute(); + +// Update +const updated = await db.membershipType.update({ where: { id: '' }, data: { name: '' }, select: { id: true } }).execute(); + +// Delete +const deleted = await db.membershipType.delete({ where: { id: '' } }).execute(); +``` + ### `db.orgMembershipDefault` CRUD operations for OrgMembershipDefault records. @@ -4194,6 +4398,7 @@ CRUD operations for AppMembership records. | `isDisabled` | Boolean | Yes | | `isVerified` | Boolean | Yes | | `isActive` | Boolean | Yes | +| `isExternal` | Boolean | Yes | | `isOwner` | Boolean | Yes | | `isAdmin` | Boolean | Yes | | `permissions` | BitString | Yes | @@ -4205,13 +4410,13 @@ CRUD operations for AppMembership records. ```typescript // List all appMembership records -const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +const items = await db.appMembership.findMany({ select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Get one by id -const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); +const item = await db.appMembership.findOne({ id: '', select: { id: true, createdAt: true, updatedAt: true, createdBy: true, updatedBy: true, isApproved: true, isBanned: true, isDisabled: true, isVerified: true, isActive: true, isExternal: true, isOwner: true, isAdmin: true, permissions: true, granted: true, actorId: true, profileId: true } }).execute(); // Create -const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); +const created = await db.appMembership.create({ data: { createdBy: '', updatedBy: '', isApproved: '', isBanned: '', isDisabled: '', isVerified: '', isActive: '', isExternal: '', isOwner: '', isAdmin: '', permissions: '', granted: '', actorId: '', profileId: '' }, select: { id: true } }).execute(); // Update const updated = await db.appMembership.update({ where: { id: '' }, data: { createdBy: '' }, select: { id: true } }).execute(); @@ -4281,6 +4486,17 @@ currentUserId const result = await db.query.currentUserId().execute(); ``` +### `db.query.currentUserAgent` + +currentUserAgent + +- **Type:** query +- **Arguments:** none + +```typescript +const result = await db.query.currentUserAgent().execute(); +``` + ### `db.query.currentIpAddress` currentIpAddress @@ -4292,15 +4508,19 @@ currentIpAddress const result = await db.query.currentIpAddress().execute(); ``` -### `db.query.currentUserAgent` +### `db.query.requireStepUp` -currentUserAgent +requireStepUp - **Type:** query -- **Arguments:** none +- **Arguments:** + + | Argument | Type | + |----------|------| + | `stepUpType` | String | ```typescript -const result = await db.query.currentUserAgent().execute(); +const result = await db.query.requireStepUp({ stepUpType: '' }).execute(); ``` ### `db.query.appPermissionsGetPaddedMask` @@ -4366,6 +4586,23 @@ revParse const result = await db.query.revParse({ dbId: '', storeId: '', refname: '' }).execute(); ``` +### `db.query.resolveBlueprintField` + +Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + +- **Type:** query +- **Arguments:** + + | Argument | Type | + |----------|------| + | `databaseId` | UUID | + | `tableId` | UUID | + | `fieldName` | String | + +```typescript +const result = await db.query.resolveBlueprintField({ databaseId: '', tableId: '', fieldName: '' }).execute(); +``` + ### `db.query.orgIsManagerOf` orgIsManagerOf @@ -4661,6 +4898,51 @@ rejectDatabaseTransfer const result = await db.mutation.rejectDatabaseTransfer({ input: { transferId: '' } }).execute(); ``` +### `db.mutation.disconnectAccount` + +disconnectAccount + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | DisconnectAccountInput (required) | + +```typescript +const result = await db.mutation.disconnectAccount({ input: { accountId: '' } }).execute(); +``` + +### `db.mutation.revokeApiKey` + +revokeApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeApiKeyInput (required) | + +```typescript +const result = await db.mutation.revokeApiKey({ input: { keyId: '' } }).execute(); +``` + +### `db.mutation.revokeSession` + +revokeSession + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | RevokeSessionInput (required) | + +```typescript +const result = await db.mutation.revokeSession({ input: { sessionId: '' } }).execute(); +``` + ### `db.mutation.verifyPassword` verifyPassword @@ -4813,7 +5095,7 @@ const result = await db.mutation.initEmptyRepo({ input: { dbId: '', storeI ### `db.mutation.constructBlueprint` -Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. +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. - **Type:** mutation - **Arguments:** @@ -4826,6 +5108,21 @@ Executes a blueprint definition by delegating to provision_* procedures. Creates const result = await db.mutation.constructBlueprint({ input: { blueprintId: '', schemaId: '' } }).execute(); ``` +### `db.mutation.provisionNewUser` + +provisionNewUser + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionNewUserInput (required) | + +```typescript +const result = await db.mutation.provisionNewUser({ input: { email: '', password: '' } }).execute(); +``` + ### `db.mutation.resetPassword` resetPassword @@ -4871,6 +5168,36 @@ Creates a new blueprint by copying a template definition. Checks visibility: own const result = await db.mutation.copyTemplateToBlueprint({ input: { templateId: '', databaseId: '', ownerId: '', nameOverride: '', displayNameOverride: '' } }).execute(); ``` +### `db.mutation.createApiKey` + +createApiKey + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | CreateApiKeyInput (required) | + +```typescript +const result = await db.mutation.createApiKey({ input: { keyName: '', accessLevel: '', mfaLevel: '' } }).execute(); +``` + +### `db.mutation.provisionSpatialRelation` + +Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + +- **Type:** mutation +- **Arguments:** + + | Argument | Type | + |----------|------| + | `input` | ProvisionSpatialRelationInput (required) | + +```typescript +const result = await db.mutation.provisionSpatialRelation({ input: '' }).execute(); +``` + ### `db.mutation.bootstrapUser` bootstrapUser @@ -5066,19 +5393,19 @@ applyRls const result = await db.mutation.applyRls({ input: '' }).execute(); ``` -### `db.mutation.signInOneTimeToken` +### `db.mutation.signInCrossOrigin` -signInOneTimeToken +signInCrossOrigin - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInOneTimeTokenInput (required) | + | `input` | SignInCrossOriginInput (required) | ```typescript -const result = await db.mutation.signInOneTimeToken({ input: { token: '', credentialKind: '' } }).execute(); +const result = await db.mutation.signInCrossOrigin({ input: { token: '', credentialKind: '' } }).execute(); ``` ### `db.mutation.createUserDatabase` @@ -5127,49 +5454,49 @@ extendTokenExpires const result = await db.mutation.extendTokenExpires({ input: { amount: '' } }).execute(); ``` -### `db.mutation.signIn` +### `db.mutation.signUp` -signIn +signUp - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignInInput (required) | + | `input` | SignUpInput (required) | ```typescript -const result = await db.mutation.signIn({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.signUp({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); ``` -### `db.mutation.signUp` +### `db.mutation.requestCrossOriginToken` -signUp +requestCrossOriginToken - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | SignUpInput (required) | + | `input` | RequestCrossOriginTokenInput (required) | ```typescript -const result = await db.mutation.signUp({ input: { email: '', password: '', rememberMe: '', credentialKind: '', csrfToken: '' } }).execute(); +const result = await db.mutation.requestCrossOriginToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); ``` -### `db.mutation.oneTimeToken` +### `db.mutation.signIn` -oneTimeToken +signIn - **Type:** mutation - **Arguments:** | Argument | Type | |----------|------| - | `input` | OneTimeTokenInput (required) | + | `input` | SignInInput (required) | ```typescript -const result = await db.mutation.oneTimeToken({ input: { email: '', password: '', origin: '', rememberMe: '' } }).execute(); +const result = await db.mutation.signIn({ input: '' }).execute(); ``` ### `db.mutation.provisionTable` diff --git a/sdk/constructive-sdk/src/public/orm/index.ts b/sdk/constructive-sdk/src/public/orm/index.ts index 0d921879c..b097a4036 100644 --- a/sdk/constructive-sdk/src/public/orm/index.ts +++ b/sdk/constructive-sdk/src/public/orm/index.ts @@ -17,6 +17,7 @@ import { SchemaModel } from './models/schema'; import { TableModel } from './models/table'; import { CheckConstraintModel } from './models/checkConstraint'; import { FieldModel } from './models/field'; +import { SpatialRelationModel } from './models/spatialRelation'; import { ForeignKeyConstraintModel } from './models/foreignKeyConstraint'; import { FullTextSearchModel } from './models/fullTextSearch'; import { IndexModel } from './models/index'; @@ -30,9 +31,9 @@ import { ViewTableModel } from './models/viewTable'; import { ViewGrantModel } from './models/viewGrant'; import { ViewRuleModel } from './models/viewRule'; import { EmbeddingChunkModel } from './models/embeddingChunk'; -import { TableTemplateModuleModel } from './models/tableTemplateModule'; import { SecureTableProvisionModel } from './models/secureTableProvision'; import { RelationProvisionModel } from './models/relationProvision'; +import { SessionSecretsModuleModel } from './models/sessionSecretsModule'; import { SchemaGrantModel } from './models/schemaGrant'; import { DefaultPrivilegeModel } from './models/defaultPrivilege'; import { EnumModel } from './models/enum'; @@ -70,6 +71,8 @@ import { BlueprintModel } from './models/blueprint'; import { BlueprintTemplateModel } from './models/blueprintTemplate'; import { BlueprintConstructionModel } from './models/blueprintConstruction'; import { StorageModuleModel } from './models/storageModule'; +import { EntityTypeProvisionModel } from './models/entityTypeProvision'; +import { WebauthnCredentialsModuleModel } from './models/webauthnCredentialsModule'; import { DatabaseProvisionModuleModel } from './models/databaseProvisionModule'; import { AppAdminGrantModel } from './models/appAdminGrant'; import { AppOwnerGrantModel } from './models/appOwnerGrant'; @@ -78,6 +81,7 @@ import { OrgMembershipModel } from './models/orgMembership'; import { OrgMemberModel } from './models/orgMember'; import { OrgAdminGrantModel } from './models/orgAdminGrant'; import { OrgOwnerGrantModel } from './models/orgOwnerGrant'; +import { OrgMemberProfileModel } from './models/orgMemberProfile'; import { OrgGrantModel } from './models/orgGrant'; import { OrgChartEdgeModel } from './models/orgChartEdge'; import { OrgChartEdgeGrantModel } from './models/orgChartEdgeGrant'; @@ -90,7 +94,6 @@ import { AppLevelModel } from './models/appLevel'; import { EmailModel } from './models/email'; import { PhoneNumberModel } from './models/phoneNumber'; import { CryptoAddressModel } from './models/cryptoAddress'; -import { ConnectedAccountModel } from './models/connectedAccount'; import { AppInviteModel } from './models/appInvite'; import { AppClaimedInviteModel } from './models/appClaimedInvite'; import { OrgInviteModel } from './models/orgInvite'; @@ -103,10 +106,12 @@ import { RoleTypeModel } from './models/roleType'; import { MigrateFileModel } from './models/migrateFile'; import { AppLimitDefaultModel } from './models/appLimitDefault'; import { OrgLimitDefaultModel } from './models/orgLimitDefault'; -import { MembershipTypeModel } from './models/membershipType'; +import { DevicesModuleModel } from './models/devicesModule'; +import { UserConnectedAccountModel } from './models/userConnectedAccount'; import { AppMembershipDefaultModel } from './models/appMembershipDefault'; import { CommitModel } from './models/commit'; import { RateLimitsModuleModel } from './models/rateLimitsModule'; +import { MembershipTypeModel } from './models/membershipType'; import { OrgMembershipDefaultModel } from './models/orgMembershipDefault'; import { RlsModuleModel } from './models/rlsModule'; import { SqlActionModel } from './models/sqlAction'; @@ -161,6 +166,7 @@ export function createClient(config: OrmClientConfig) { table: new TableModel(client), checkConstraint: new CheckConstraintModel(client), field: new FieldModel(client), + spatialRelation: new SpatialRelationModel(client), foreignKeyConstraint: new ForeignKeyConstraintModel(client), fullTextSearch: new FullTextSearchModel(client), index: new IndexModel(client), @@ -174,9 +180,9 @@ export function createClient(config: OrmClientConfig) { viewGrant: new ViewGrantModel(client), viewRule: new ViewRuleModel(client), embeddingChunk: new EmbeddingChunkModel(client), - tableTemplateModule: new TableTemplateModuleModel(client), secureTableProvision: new SecureTableProvisionModel(client), relationProvision: new RelationProvisionModel(client), + sessionSecretsModule: new SessionSecretsModuleModel(client), schemaGrant: new SchemaGrantModel(client), defaultPrivilege: new DefaultPrivilegeModel(client), enum: new EnumModel(client), @@ -214,6 +220,8 @@ export function createClient(config: OrmClientConfig) { blueprintTemplate: new BlueprintTemplateModel(client), blueprintConstruction: new BlueprintConstructionModel(client), storageModule: new StorageModuleModel(client), + entityTypeProvision: new EntityTypeProvisionModel(client), + webauthnCredentialsModule: new WebauthnCredentialsModuleModel(client), databaseProvisionModule: new DatabaseProvisionModuleModel(client), appAdminGrant: new AppAdminGrantModel(client), appOwnerGrant: new AppOwnerGrantModel(client), @@ -222,6 +230,7 @@ export function createClient(config: OrmClientConfig) { orgMember: new OrgMemberModel(client), orgAdminGrant: new OrgAdminGrantModel(client), orgOwnerGrant: new OrgOwnerGrantModel(client), + orgMemberProfile: new OrgMemberProfileModel(client), orgGrant: new OrgGrantModel(client), orgChartEdge: new OrgChartEdgeModel(client), orgChartEdgeGrant: new OrgChartEdgeGrantModel(client), @@ -234,7 +243,6 @@ export function createClient(config: OrmClientConfig) { email: new EmailModel(client), phoneNumber: new PhoneNumberModel(client), cryptoAddress: new CryptoAddressModel(client), - connectedAccount: new ConnectedAccountModel(client), appInvite: new AppInviteModel(client), appClaimedInvite: new AppClaimedInviteModel(client), orgInvite: new OrgInviteModel(client), @@ -247,10 +255,12 @@ export function createClient(config: OrmClientConfig) { migrateFile: new MigrateFileModel(client), appLimitDefault: new AppLimitDefaultModel(client), orgLimitDefault: new OrgLimitDefaultModel(client), - membershipType: new MembershipTypeModel(client), + devicesModule: new DevicesModuleModel(client), + userConnectedAccount: new UserConnectedAccountModel(client), appMembershipDefault: new AppMembershipDefaultModel(client), commit: new CommitModel(client), rateLimitsModule: new RateLimitsModuleModel(client), + membershipType: new MembershipTypeModel(client), orgMembershipDefault: new OrgMembershipDefaultModel(client), rlsModule: new RlsModuleModel(client), sqlAction: new SqlActionModel(client), diff --git a/sdk/constructive-sdk/src/public/orm/input-types.ts b/sdk/constructive-sdk/src/public/orm/input-types.ts index 60b4df70c..32d62b5eb 100644 --- a/sdk/constructive-sdk/src/public/orm/input-types.ts +++ b/sdk/constructive-sdk/src/public/orm/input-types.ts @@ -392,6 +392,23 @@ export interface Field { createdAt?: string | null; updatedAt?: string | null; } +export interface SpatialRelation { + id: string; + databaseId?: string | null; + tableId?: string | null; + fieldId?: string | null; + refTableId?: string | null; + refFieldId?: string | null; + name?: string | null; + operator?: string | null; + paramName?: string | null; + category?: ObjectCategory | null; + module?: string | null; + scope?: number | null; + tags?: string[] | null; + createdAt?: string | null; + updatedAt?: string | null; +} export interface ForeignKeyConstraint { id: string; databaseId?: string | null; @@ -585,17 +602,6 @@ export interface EmbeddingChunk { createdAt?: string | null; updatedAt?: string | null; } -export interface TableTemplateModule { - id: string; - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - tableId?: string | null; - ownerTableId?: string | null; - tableName?: string | null; - nodeType?: string | null; - data?: Record | null; -} /** Provisions security, fields, grants, and policies onto a table. Each row can independently: (1) create fields via nodes[] array (supporting multiple Data* modules per row), (2) grant privileges via grant_privileges, (3) create RLS policies via policy_type. Multiple rows can target the same table to compose different concerns. All three concerns are optional and independent. */ export interface SecureTableProvision { /** Unique identifier for this provision row. */ @@ -785,6 +791,16 @@ export interface RelationProvision { /** Output column for RelationManyToMany: the UUID of the FK field on the junction table referencing the target table. Populated by the trigger. NULL for RelationBelongsTo/RelationHasOne. Callers should not set this directly. */ outTargetFieldId?: string | null; } +/** Config row for the session_secrets_module, which provisions a DB-private, session-scoped ephemeral key-value store for challenges, nonces, and one-time tokens that must never be readable by end users. */ +export interface SessionSecretsModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; + /** Resolved reference to sessions_module.sessions_table, used to FK session_secrets.session_id with ON DELETE CASCADE. */ + sessionsTableId?: string | null; +} export interface SchemaGrant { id: string; databaseId?: string | null; @@ -1149,6 +1165,7 @@ export interface MembershipsModule { entityIdsByMask?: string | null; entityIdsByPerm?: string | null; entityIdsFunction?: string | null; + memberProfilesTableId?: string | null; } export interface PermissionsModule { id: string; @@ -1242,8 +1259,8 @@ export interface UserAuthModule { checkPasswordFunction?: string | null; sendAccountDeletionEmailFunction?: string | null; deleteAccountFunction?: string | null; - signInOneTimeTokenFunction?: string | null; - oneTimeTokenFunction?: string | null; + signInCrossOriginFunction?: string | null; + requestCrossOriginTokenFunction?: string | null; extendTokenExpires?: string | null; } export interface UsersModule { @@ -1372,6 +1389,153 @@ export interface StorageModule { maxFilenameLength?: number | null; cacheTtlSeconds?: number | null; } +/** + * 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. + */ +export interface EntityTypeProvision { + /** Unique identifier for this provision row. */ + id: string; + /** The database to provision this entity type in. Required. */ + databaseId?: string | null; + /** + * Human-readable name for this membership type, e.g. 'Data Room Member', 'Team Channel Member'. Required. + * Stored in the membership_types registry table. + */ + name?: string | null; + /** + * SQL prefix used for table and module naming, e.g. 'data_room', 'team_channel'. Required. + * Drives entity table name (prefix || 's' by default), module labels (permissions_module:prefix), + * and membership table names (prefix_memberships, prefix_members, etc.). + * Must be unique per database — the (database_id, prefix) constraint ensures graceful ON CONFLICT DO NOTHING. + */ + prefix?: string | null; + /** Description of this membership type. Stored in the membership_types registry table. Defaults to empty string. */ + description?: string | null; + /** + * Prefix of the parent entity type. The trigger resolves this to a membership_type integer + * by looking up memberships_module WHERE prefix = parent_entity. + * Defaults to 'org' (the organization-level type). For nested types, set to the parent's prefix + * (e.g. 'data_room' for a team_channel nested under data_room). + * The parent type must already be provisioned before this INSERT. + */ + parentEntity?: string | null; + /** + * Override the entity table name. When NULL (default), the table name is derived as prefix || 's' + * (e.g. prefix 'data_room' produces table 'data_rooms'). + * Set this when the pluralization rule doesn't apply (e.g. prefix 'staff' should produce 'staff' not 'staffs'). + */ + tableName?: string | null; + /** + * Whether members of the parent entity can see child entities. Defaults to true. + * When true: a SELECT policy allows parent members to list child entities (e.g. org members can see all data rooms). + * When false: only direct members of the entity itself can see it (private entity mode). + * Controls whether the parent_member SELECT policy is created on the entity table. + * Only meaningful on the defaults path — ignored (no-op) when table_provision is non-NULL or + * skip_entity_policies=true, since no default policies are being applied in those cases. + */ + isVisible?: boolean | null; + /** + * Whether to apply limits_module security for this type. Defaults to false. + * The limits_module table structure is always created (memberships_module requires it), + * but when false, no RLS policies are applied to the limits tables. + * Set to true if this entity type needs configurable resource limits per membership. + */ + hasLimits?: boolean | null; + /** + * Whether to provision profiles_module for this type. Defaults to false. + * Profiles provide named permission roles (e.g. 'Editor', 'Viewer') with pre-configured permission bitmasks. + * When true, creates profile tables and applies profiles security. + */ + hasProfiles?: boolean | null; + /** + * Whether to provision levels_module for this type. Defaults to false. + * Levels provide gamification/achievement tracking for members. + * When true, creates level steps, achievements, and level tables with security. + */ + hasLevels?: boolean | null; + /** + * Escape hatch: when true, apply zero RLS policies to the entity table. Defaults to false. + * Use this only when you want the entity table provisioned with zero policies (e.g. because you + * plan to insert secure_table_provision rows yourself later). In most cases, prefer leaving this + * false and either accepting the five defaults (table_provision=NULL) or overriding them via + * table_provision. + * Defaults (applied when table_provision IS NULL and skip_entity_policies=false): + * - SELECT (parent_member): parent entity members can see child entities (only when is_visible=true) + * - SELECT (self_member): direct members of the entity can see it + * - INSERT: create_entity permission on the parent entity + * - UPDATE: admin_entity permission on the entity itself + * - DELETE: owner of the entity can delete it + */ + skipEntityPolicies?: boolean | null; + /** + * Single jsonb object describing the full security setup to apply to the entity table. + * Uses the same vocabulary as metaschema_modules_public.provision_table() and blueprint tables[] + * entries, so an entity table is configured the same way an ordinary blueprint table is. + * Defaults to NULL; when non-NULL, the five default policies are implicitly replaced by + * table_provision.policies[] (is_visible becomes a no-op on this path). + * Recognized keys (all optional): + * - use_rls (boolean, default true) + * - nodes (jsonb array of {"$type","data"} Data* module entries) + * - fields (jsonb array of field objects: name,type,is_required,default,min,max,regexp,index) + * - grant_privileges (jsonb array of [privilege, columns] tuples) + * - grant_roles (jsonb array of role names; defaults to ["authenticated"]) + * - policies (jsonb array of policy objects; each with $type, privileges, data, name, role, permissive) + * The trigger fans policies[] into N secure_table_provision rows against the newly created entity table, + * with table-level setup (nodes/fields/grants) attached to the first row. + * Example — override with two SELECT policies: + * table_provision := jsonb_build_object( + * 'policies', jsonb_build_array( + * jsonb_build_object( + * '$type', 'AuthzEntityMembership', + * 'privileges', jsonb_build_array('select'), + * 'data', jsonb_build_object('entity_field', 'id', 'membership_type', 3), + * 'name', 'self_member' + * ), + * jsonb_build_object( + * '$type', 'AuthzDirectOwner', + * 'privileges', jsonb_build_array('select', 'update'), + * 'data', jsonb_build_object('owner_field', 'owner_id') + * ) + * ) + * ) + */ + tableProvision?: Record | null; + /** + * Output: the auto-assigned integer membership type ID. Populated by the trigger after successful provisioning. + * This is the ID used in membership_types, memberships_module, and all module tables. + */ + outMembershipType?: number | null; + /** + * Output: the UUID of the created entity table. Populated by the trigger. + * Use this to reference the entity table in subsequent relation_provision or secure_table_provision rows. + */ + outEntityTableId?: string | null; + /** Output: the name of the created entity table (e.g. 'data_rooms'). Populated by the trigger. */ + outEntityTableName?: string | null; + /** + * Output: array of installed module labels (e.g. ARRAY['permissions_module:data_room', 'memberships_module:data_room', 'invites_module:data_room']). + * Populated by the trigger. Useful for verifying which modules were provisioned. + */ + outInstalledModules?: string[] | null; +} +/** Config row for the webauthn_credentials_module, which provisions the per-user WebAuthn/passkey credentials table (public key, counter, transports, device type, backup state) mirroring crypto_addresses_module. The sibling webauthn_auth_module (RP config, sign-in/sign-up function names) lands later; Phase 11a is credentials only. */ +export interface WebauthnCredentialsModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + /** Reserved for future SECURITY DEFINER helpers on webauthn_credentials; unused in Phase 11a. */ + privateSchemaId?: string | null; + tableId?: string | null; + ownerTableId?: string | null; + tableName?: string | null; +} /** Tracks database provisioning requests and their status. The BEFORE INSERT trigger creates the database and sets database_id before RLS policies are evaluated. */ export interface DatabaseProvisionModule { id: string; @@ -1448,6 +1612,8 @@ export interface OrgMembership { isDisabled?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -1460,6 +1626,8 @@ export interface OrgMembership { actorId?: string | null; /** References the entity (org or group) this membership belongs to */ entityId?: string | null; + /** Whether this member has read-only access (blocks mutations when true) */ + isReadOnly?: boolean | null; profileId?: string | null; } /** Simplified view of active members in an entity, used for listing who belongs to an org or group */ @@ -1498,6 +1666,28 @@ export interface OrgOwnerGrant { createdAt?: string | null; updatedAt?: string | null; } +/** Per-membership profile information visible to other entity members (display name, email, title, bio, avatar) */ +export interface OrgMemberProfile { + id: string; + createdAt?: string | null; + updatedAt?: string | null; + /** References the membership this profile belongs to (1:1) */ + membershipId?: string | null; + /** References the entity this profile belongs to (used for RLS lookups) */ + entityId?: string | null; + /** References the user who owns this profile (for self-edit RLS) */ + actorId?: string | null; + /** Display name shown to other entity members */ + displayName?: string | null; + /** Email address visible to other entity members (auto-populated from verified primary email) */ + email?: string | null; + /** Job title or role description visible to other entity members */ + title?: string | null; + /** Short biography visible to other entity members */ + bio?: string | null; + /** Profile picture visible to other entity members */ + profilePicture?: ConstructiveInternalTypeImage | null; +} /** Records of individual permission grants and revocations for members via bitmask */ export interface OrgGrant { id: string; @@ -1659,21 +1849,6 @@ export interface CryptoAddress { createdAt?: string | null; updatedAt?: string | null; } -/** OAuth and social login connections linking external service accounts to users */ -export interface ConnectedAccount { - id: string; - ownerId?: string | null; - /** The service used, e.g. `twitter` or `github`. */ - service?: string | null; - /** A unique identifier for the user within the service */ - identifier?: string | null; - /** Additional profile details extracted from this login method */ - details?: Record | null; - /** Whether this connected account has been verified */ - isVerified?: boolean | null; - createdAt?: string | null; - updatedAt?: string | null; -} /** Invitation records sent to prospective members via email, with token-based redemption and expiration */ export interface AppInvite { id: string; @@ -1821,16 +1996,24 @@ export interface OrgLimitDefault { /** Default maximum usage allowed for this limit */ max?: number | null; } -/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ -export interface MembershipType { - /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ - id: number; - /** Human-readable name of the membership type */ - name?: string | null; - /** Description of what this membership type represents */ - description?: string | null; - /** Short prefix used to namespace tables and functions for this membership scope */ - prefix?: string | null; +export interface DevicesModule { + id: string; + databaseId?: string | null; + schemaId?: string | null; + userDevicesTableId?: string | null; + deviceSettingsTableId?: string | null; + userDevicesTable?: string | null; + deviceSettingsTable?: string | null; +} +export interface UserConnectedAccount { + id: string; + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; + createdAt?: string | null; + updatedAt?: string | null; } /** Default membership settings per entity, controlling initial approval and verification state for new members */ export interface AppMembershipDefault { @@ -1874,6 +2057,21 @@ export interface RateLimitsModule { ipRateLimitsTable?: string | null; rateLimitsTable?: string | null; } +/** Defines the different scopes of membership (e.g. App Member, Organization Member, Group Member) */ +export interface MembershipType { + /** Integer identifier for the membership type (1=App, 2=Organization, 3=Group) */ + id: number; + /** Human-readable name of the membership type */ + name?: string | null; + /** Description of what this membership type represents */ + description?: string | null; + /** Short prefix used to namespace tables and functions for this membership scope */ + prefix?: string | null; + /** Parent membership type ID for SPRT cascade chain (e.g. type 2 parent=1, type 3 parent=2) */ + parentMembershipType?: number | null; + /** When true, entities of this membership type get a one-to-one ID in the users table and a corresponding role_type entry, enabling them to own resources via owner_id FKs */ + hasUsersTableEntry?: boolean | null; +} /** Default membership settings per entity, controlling initial approval and verification state for new members */ export interface OrgMembershipDefault { id: string; @@ -1966,6 +2164,8 @@ export interface AppMembership { isVerified?: boolean | null; /** Computed field indicating the membership is approved, verified, not banned, and not disabled */ isActive?: boolean | null; + /** Whether this member is external (not a member of the parent scope). External members may have restricted permissions. */ + isExternal?: boolean | null; /** Whether the actor is the owner of this entity */ isOwner?: boolean | null; /** Whether the actor has admin privileges on this entity */ @@ -2025,6 +2225,7 @@ export interface DatabaseRelations { rlsModule?: RlsModule | null; hierarchyModule?: HierarchyModule | null; rateLimitsModule?: RateLimitsModule | null; + devicesModule?: DevicesModule | null; schemas?: ConnectionResult; tables?: ConnectionResult
; checkConstraints?: ConnectionResult; @@ -2045,6 +2246,7 @@ export interface DatabaseRelations { defaultPrivileges?: ConnectionResult; enums?: ConnectionResult; embeddingChunks?: ConnectionResult; + spatialRelations?: ConnectionResult; databaseTransfers?: ConnectionResult; apis?: ConnectionResult; apiModules?: ConnectionResult; @@ -2074,12 +2276,14 @@ export interface DatabaseRelations { sessionsModules?: ConnectionResult; userAuthModules?: ConnectionResult; usersModules?: ConnectionResult; - tableTemplateModules?: ConnectionResult; secureTableProvisions?: ConnectionResult; relationProvisions?: ConnectionResult; blueprints?: ConnectionResult; blueprintConstructions?: ConnectionResult; storageModules?: ConnectionResult; + entityTypeProvisions?: ConnectionResult; + sessionSecretsModules?: ConnectionResult; + webauthnCredentialsModules?: ConnectionResult; databaseProvisionModules?: ConnectionResult; } export interface SchemaRelations { @@ -2090,8 +2294,7 @@ export interface SchemaRelations { defaultPrivileges?: ConnectionResult; enums?: ConnectionResult; apiSchemas?: ConnectionResult; - tableTemplateModulesByPrivateSchemaId?: ConnectionResult; - tableTemplateModules?: ConnectionResult; + sessionSecretsModules?: ConnectionResult; } export interface TableRelations { database?: Database | null; @@ -2111,11 +2314,13 @@ export interface TableRelations { viewTables?: ConnectionResult; embeddingChunksByChunksTableId?: ConnectionResult; embeddingChunks?: ConnectionResult; - tableTemplateModulesByOwnerTableId?: ConnectionResult; - tableTemplateModules?: ConnectionResult; + spatialRelationsByRefTableId?: ConnectionResult; + spatialRelations?: ConnectionResult; secureTableProvisions?: ConnectionResult; relationProvisionsBySourceTableId?: ConnectionResult; relationProvisionsByTargetTableId?: ConnectionResult; + sessionSecretsModulesBySessionsTableId?: ConnectionResult; + sessionSecretsModules?: ConnectionResult; } export interface CheckConstraintRelations { database?: Database | null; @@ -2124,6 +2329,15 @@ export interface CheckConstraintRelations { export interface FieldRelations { database?: Database | null; table?: Table | null; + spatialRelations?: ConnectionResult; + spatialRelationsByRefFieldId?: ConnectionResult; +} +export interface SpatialRelationRelations { + database?: Database | null; + field?: Field | null; + refField?: Field | null; + refTable?: Table | null; + table?: Table | null; } export interface ForeignKeyConstraintRelations { database?: Database | null; @@ -2185,13 +2399,6 @@ export interface EmbeddingChunkRelations { parentFkField?: Field | null; table?: Table | null; } -export interface TableTemplateModuleRelations { - database?: Database | null; - ownerTable?: Table | null; - privateSchema?: Schema | null; - schema?: Schema | null; - table?: Table | null; -} export interface SecureTableProvisionRelations { database?: Database | null; schema?: Schema | null; @@ -2202,6 +2409,12 @@ export interface RelationProvisionRelations { sourceTable?: Table | null; targetTable?: Table | null; } +export interface SessionSecretsModuleRelations { + database?: Database | null; + schema?: Schema | null; + sessionsTable?: Table | null; + table?: Table | null; +} export interface SchemaGrantRelations { database?: Database | null; schema?: Schema | null; @@ -2441,6 +2654,16 @@ export interface StorageModuleRelations { schema?: Schema | null; uploadRequestsTable?: Table | null; } +export interface EntityTypeProvisionRelations { + database?: Database | null; +} +export interface WebauthnCredentialsModuleRelations { + database?: Database | null; + ownerTable?: Table | null; + privateSchema?: Schema | null; + schema?: Schema | null; + table?: Table | null; +} export interface DatabaseProvisionModuleRelations { database?: Database | null; } @@ -2459,6 +2682,7 @@ export interface AppGrantRelations { export interface OrgMembershipRelations { actor?: User | null; entity?: User | null; + orgMemberProfileByMembershipId?: OrgMemberProfile | null; } export interface OrgMemberRelations { actor?: User | null; @@ -2474,6 +2698,11 @@ export interface OrgOwnerGrantRelations { entity?: User | null; grantor?: User | null; } +export interface OrgMemberProfileRelations { + actor?: User | null; + entity?: User | null; + membership?: OrgMembership | null; +} export interface OrgGrantRelations { actor?: User | null; entity?: User | null; @@ -2518,9 +2747,6 @@ export interface PhoneNumberRelations { export interface CryptoAddressRelations { owner?: User | null; } -export interface ConnectedAccountRelations { - owner?: User | null; -} export interface AppInviteRelations { sender?: User | null; } @@ -2548,7 +2774,13 @@ export interface RoleTypeRelations {} export interface MigrateFileRelations {} export interface AppLimitDefaultRelations {} export interface OrgLimitDefaultRelations {} -export interface MembershipTypeRelations {} +export interface DevicesModuleRelations { + database?: Database | null; + deviceSettingsTableByDeviceSettingsTableId?: Table | null; + schema?: Schema | null; + userDevicesTableByUserDevicesTableId?: Table | null; +} +export interface UserConnectedAccountRelations {} export interface AppMembershipDefaultRelations {} export interface CommitRelations {} export interface RateLimitsModuleRelations { @@ -2558,6 +2790,7 @@ export interface RateLimitsModuleRelations { rateLimitsTableByRateLimitsTableId?: Table | null; schema?: Schema | null; } +export interface MembershipTypeRelations {} export interface OrgMembershipDefaultRelations { entity?: User | null; } @@ -2591,6 +2824,8 @@ export interface UserRelations { orgOwnerGrantsByActorId?: ConnectionResult; orgOwnerGrantsByEntityId?: ConnectionResult; orgOwnerGrantsByGrantorId?: ConnectionResult; + orgMemberProfilesByActorId?: ConnectionResult; + orgMemberProfilesByEntityId?: ConnectionResult; orgGrantsByActorId?: ConnectionResult; orgGrantsByEntityId?: ConnectionResult; orgGrantsByGrantorId?: ConnectionResult; @@ -2611,7 +2846,6 @@ export interface UserRelations { ownedEmails?: ConnectionResult; ownedPhoneNumbers?: ConnectionResult; ownedCryptoAddresses?: ConnectionResult; - ownedConnectedAccounts?: ConnectionResult; appInvitesBySenderId?: ConnectionResult; appClaimedInvitesByReceiverId?: ConnectionResult; appClaimedInvitesBySenderId?: ConnectionResult; @@ -2652,6 +2886,7 @@ export type SchemaWithRelations = Schema & SchemaRelations; export type TableWithRelations = Table & TableRelations; export type CheckConstraintWithRelations = CheckConstraint & CheckConstraintRelations; export type FieldWithRelations = Field & FieldRelations; +export type SpatialRelationWithRelations = SpatialRelation & SpatialRelationRelations; export type ForeignKeyConstraintWithRelations = ForeignKeyConstraint & ForeignKeyConstraintRelations; export type FullTextSearchWithRelations = FullTextSearch & FullTextSearchRelations; @@ -2667,10 +2902,11 @@ export type ViewTableWithRelations = ViewTable & ViewTableRelations; export type ViewGrantWithRelations = ViewGrant & ViewGrantRelations; export type ViewRuleWithRelations = ViewRule & ViewRuleRelations; export type EmbeddingChunkWithRelations = EmbeddingChunk & EmbeddingChunkRelations; -export type TableTemplateModuleWithRelations = TableTemplateModule & TableTemplateModuleRelations; export type SecureTableProvisionWithRelations = SecureTableProvision & SecureTableProvisionRelations; export type RelationProvisionWithRelations = RelationProvision & RelationProvisionRelations; +export type SessionSecretsModuleWithRelations = SessionSecretsModule & + SessionSecretsModuleRelations; export type SchemaGrantWithRelations = SchemaGrant & SchemaGrantRelations; export type DefaultPrivilegeWithRelations = DefaultPrivilege & DefaultPrivilegeRelations; export type EnumWithRelations = Enum & EnumRelations; @@ -2714,6 +2950,9 @@ export type BlueprintTemplateWithRelations = BlueprintTemplate & BlueprintTempla export type BlueprintConstructionWithRelations = BlueprintConstruction & BlueprintConstructionRelations; export type StorageModuleWithRelations = StorageModule & StorageModuleRelations; +export type EntityTypeProvisionWithRelations = EntityTypeProvision & EntityTypeProvisionRelations; +export type WebauthnCredentialsModuleWithRelations = WebauthnCredentialsModule & + WebauthnCredentialsModuleRelations; export type DatabaseProvisionModuleWithRelations = DatabaseProvisionModule & DatabaseProvisionModuleRelations; export type AppAdminGrantWithRelations = AppAdminGrant & AppAdminGrantRelations; @@ -2723,6 +2962,7 @@ export type OrgMembershipWithRelations = OrgMembership & OrgMembershipRelations; export type OrgMemberWithRelations = OrgMember & OrgMemberRelations; export type OrgAdminGrantWithRelations = OrgAdminGrant & OrgAdminGrantRelations; export type OrgOwnerGrantWithRelations = OrgOwnerGrant & OrgOwnerGrantRelations; +export type OrgMemberProfileWithRelations = OrgMemberProfile & OrgMemberProfileRelations; export type OrgGrantWithRelations = OrgGrant & OrgGrantRelations; export type OrgChartEdgeWithRelations = OrgChartEdge & OrgChartEdgeRelations; export type OrgChartEdgeGrantWithRelations = OrgChartEdgeGrant & OrgChartEdgeGrantRelations; @@ -2736,7 +2976,6 @@ export type AppLevelWithRelations = AppLevel & AppLevelRelations; export type EmailWithRelations = Email & EmailRelations; export type PhoneNumberWithRelations = PhoneNumber & PhoneNumberRelations; export type CryptoAddressWithRelations = CryptoAddress & CryptoAddressRelations; -export type ConnectedAccountWithRelations = ConnectedAccount & ConnectedAccountRelations; export type AppInviteWithRelations = AppInvite & AppInviteRelations; export type AppClaimedInviteWithRelations = AppClaimedInvite & AppClaimedInviteRelations; export type OrgInviteWithRelations = OrgInvite & OrgInviteRelations; @@ -2750,11 +2989,14 @@ export type RoleTypeWithRelations = RoleType & RoleTypeRelations; export type MigrateFileWithRelations = MigrateFile & MigrateFileRelations; export type AppLimitDefaultWithRelations = AppLimitDefault & AppLimitDefaultRelations; export type OrgLimitDefaultWithRelations = OrgLimitDefault & OrgLimitDefaultRelations; -export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; +export type DevicesModuleWithRelations = DevicesModule & DevicesModuleRelations; +export type UserConnectedAccountWithRelations = UserConnectedAccount & + UserConnectedAccountRelations; export type AppMembershipDefaultWithRelations = AppMembershipDefault & AppMembershipDefaultRelations; export type CommitWithRelations = Commit & CommitRelations; export type RateLimitsModuleWithRelations = RateLimitsModule & RateLimitsModuleRelations; +export type MembershipTypeWithRelations = MembershipType & MembershipTypeRelations; export type OrgMembershipDefaultWithRelations = OrgMembershipDefault & OrgMembershipDefaultRelations; export type RlsModuleWithRelations = RlsModule & RlsModuleRelations; @@ -2831,6 +3073,9 @@ export type DatabaseSelect = { rateLimitsModule?: { select: RateLimitsModuleSelect; }; + devicesModule?: { + select: DevicesModuleSelect; + }; schemas?: { select: SchemaSelect; first?: number; @@ -2951,6 +3196,12 @@ export type DatabaseSelect = { filter?: EmbeddingChunkFilter; orderBy?: EmbeddingChunkOrderBy[]; }; + spatialRelations?: { + select: SpatialRelationSelect; + first?: number; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; + }; databaseTransfers?: { select: DatabaseTransferSelect; first?: number; @@ -3125,12 +3376,6 @@ export type DatabaseSelect = { filter?: UsersModuleFilter; orderBy?: UsersModuleOrderBy[]; }; - tableTemplateModules?: { - select: TableTemplateModuleSelect; - first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; - }; secureTableProvisions?: { select: SecureTableProvisionSelect; first?: number; @@ -3161,6 +3406,24 @@ export type DatabaseSelect = { filter?: StorageModuleFilter; orderBy?: StorageModuleOrderBy[]; }; + entityTypeProvisions?: { + select: EntityTypeProvisionSelect; + first?: number; + filter?: EntityTypeProvisionFilter; + orderBy?: EntityTypeProvisionOrderBy[]; + }; + sessionSecretsModules?: { + select: SessionSecretsModuleSelect; + first?: number; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; + }; + webauthnCredentialsModules?: { + select: WebauthnCredentialsModuleSelect; + first?: number; + filter?: WebauthnCredentialsModuleFilter; + orderBy?: WebauthnCredentialsModuleOrderBy[]; + }; databaseProvisionModules?: { select: DatabaseProvisionModuleSelect; first?: number; @@ -3222,17 +3485,11 @@ export type SchemaSelect = { filter?: ApiSchemaFilter; orderBy?: ApiSchemaOrderBy[]; }; - tableTemplateModulesByPrivateSchemaId?: { - select: TableTemplateModuleSelect; - first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; - }; - tableTemplateModules?: { - select: TableTemplateModuleSelect; + sessionSecretsModules?: { + select: SessionSecretsModuleSelect; first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; }; }; export type TableSelect = { @@ -3348,17 +3605,17 @@ export type TableSelect = { filter?: EmbeddingChunkFilter; orderBy?: EmbeddingChunkOrderBy[]; }; - tableTemplateModulesByOwnerTableId?: { - select: TableTemplateModuleSelect; + spatialRelationsByRefTableId?: { + select: SpatialRelationSelect; first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; }; - tableTemplateModules?: { - select: TableTemplateModuleSelect; + spatialRelations?: { + select: SpatialRelationSelect; first?: number; - filter?: TableTemplateModuleFilter; - orderBy?: TableTemplateModuleOrderBy[]; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; }; secureTableProvisions?: { select: SecureTableProvisionSelect; @@ -3378,6 +3635,18 @@ export type TableSelect = { filter?: RelationProvisionFilter; orderBy?: RelationProvisionOrderBy[]; }; + sessionSecretsModulesBySessionsTableId?: { + select: SessionSecretsModuleSelect; + first?: number; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; + }; + sessionSecretsModules?: { + select: SessionSecretsModuleSelect; + first?: number; + filter?: SessionSecretsModuleFilter; + orderBy?: SessionSecretsModuleOrderBy[]; + }; }; export type CheckConstraintSelect = { id?: boolean; @@ -3432,6 +3701,50 @@ export type FieldSelect = { table?: { select: TableSelect; }; + spatialRelations?: { + select: SpatialRelationSelect; + first?: number; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; + }; + spatialRelationsByRefFieldId?: { + select: SpatialRelationSelect; + first?: number; + filter?: SpatialRelationFilter; + orderBy?: SpatialRelationOrderBy[]; + }; +}; +export type SpatialRelationSelect = { + id?: boolean; + databaseId?: boolean; + tableId?: boolean; + fieldId?: boolean; + refTableId?: boolean; + refFieldId?: boolean; + name?: boolean; + operator?: boolean; + paramName?: boolean; + category?: boolean; + module?: boolean; + scope?: boolean; + tags?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + database?: { + select: DatabaseSelect; + }; + field?: { + select: FieldSelect; + }; + refField?: { + select: FieldSelect; + }; + refTable?: { + select: TableSelect; + }; + table?: { + select: TableSelect; + }; }; export type ForeignKeyConstraintSelect = { id?: boolean; @@ -3733,32 +4046,6 @@ export type EmbeddingChunkSelect = { select: TableSelect; }; }; -export type TableTemplateModuleSelect = { - id?: boolean; - databaseId?: boolean; - schemaId?: boolean; - privateSchemaId?: boolean; - tableId?: boolean; - ownerTableId?: boolean; - tableName?: boolean; - nodeType?: boolean; - data?: boolean; - database?: { - select: DatabaseSelect; - }; - ownerTable?: { - select: TableSelect; - }; - privateSchema?: { - select: SchemaSelect; - }; - schema?: { - select: SchemaSelect; - }; - table?: { - select: TableSelect; - }; -}; export type SecureTableProvisionSelect = { id?: boolean; databaseId?: boolean; @@ -3828,6 +4115,26 @@ export type RelationProvisionSelect = { select: TableSelect; }; }; +export type SessionSecretsModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + tableId?: boolean; + tableName?: boolean; + sessionsTableId?: boolean; + database?: { + select: DatabaseSelect; + }; + schema?: { + select: SchemaSelect; + }; + sessionsTable?: { + select: TableSelect; + }; + table?: { + select: TableSelect; + }; +}; export type SchemaGrantSelect = { id?: boolean; databaseId?: boolean; @@ -4422,6 +4729,7 @@ export type MembershipsModuleSelect = { entityIdsByMask?: boolean; entityIdsByPerm?: boolean; entityIdsFunction?: boolean; + memberProfilesTableId?: boolean; actorTable?: { select: TableSelect; }; @@ -4656,8 +4964,8 @@ export type UserAuthModuleSelect = { checkPasswordFunction?: boolean; sendAccountDeletionEmailFunction?: boolean; deleteAccountFunction?: boolean; - signInOneTimeTokenFunction?: boolean; - oneTimeTokenFunction?: boolean; + signInCrossOriginFunction?: boolean; + requestCrossOriginTokenFunction?: boolean; extendTokenExpires?: boolean; database?: { select: DatabaseSelect; @@ -4830,6 +5138,52 @@ export type StorageModuleSelect = { select: TableSelect; }; }; +export type EntityTypeProvisionSelect = { + id?: boolean; + databaseId?: boolean; + name?: boolean; + prefix?: boolean; + description?: boolean; + parentEntity?: boolean; + tableName?: boolean; + isVisible?: boolean; + hasLimits?: boolean; + hasProfiles?: boolean; + hasLevels?: boolean; + skipEntityPolicies?: boolean; + tableProvision?: boolean; + outMembershipType?: boolean; + outEntityTableId?: boolean; + outEntityTableName?: boolean; + outInstalledModules?: boolean; + database?: { + select: DatabaseSelect; + }; +}; +export type WebauthnCredentialsModuleSelect = { + id?: boolean; + databaseId?: boolean; + schemaId?: boolean; + privateSchemaId?: boolean; + tableId?: boolean; + ownerTableId?: boolean; + tableName?: boolean; + database?: { + select: DatabaseSelect; + }; + ownerTable?: { + select: TableSelect; + }; + privateSchema?: { + select: SchemaSelect; + }; + schema?: { + select: SchemaSelect; + }; + table?: { + select: TableSelect; + }; +}; export type DatabaseProvisionModuleSelect = { id?: boolean; databaseName?: boolean; @@ -4902,12 +5256,14 @@ export type OrgMembershipSelect = { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; granted?: boolean; actorId?: boolean; entityId?: boolean; + isReadOnly?: boolean; profileId?: boolean; actor?: { select: UserSelect; @@ -4915,6 +5271,9 @@ export type OrgMembershipSelect = { entity?: { select: UserSelect; }; + orgMemberProfileByMembershipId?: { + select: OrgMemberProfileSelect; + }; }; export type OrgMemberSelect = { id?: boolean; @@ -4964,6 +5323,28 @@ export type OrgOwnerGrantSelect = { select: UserSelect; }; }; +export type OrgMemberProfileSelect = { + id?: boolean; + createdAt?: boolean; + updatedAt?: boolean; + membershipId?: boolean; + entityId?: boolean; + actorId?: boolean; + displayName?: boolean; + email?: boolean; + title?: boolean; + bio?: boolean; + profilePicture?: boolean; + actor?: { + select: UserSelect; + }; + entity?: { + select: UserSelect; + }; + membership?: { + select: OrgMembershipSelect; + }; +}; export type OrgGrantSelect = { id?: boolean; permissions?: boolean; @@ -5128,19 +5509,6 @@ export type CryptoAddressSelect = { select: UserSelect; }; }; -export type ConnectedAccountSelect = { - id?: boolean; - ownerId?: boolean; - service?: boolean; - identifier?: boolean; - details?: boolean; - isVerified?: boolean; - createdAt?: boolean; - updatedAt?: boolean; - owner?: { - select: UserSelect; - }; -}; export type AppInviteSelect = { id?: boolean; email?: boolean; @@ -5265,11 +5633,36 @@ export type OrgLimitDefaultSelect = { name?: boolean; max?: boolean; }; -export type MembershipTypeSelect = { +export type DevicesModuleSelect = { id?: boolean; - name?: boolean; - description?: boolean; - prefix?: boolean; + databaseId?: boolean; + schemaId?: boolean; + userDevicesTableId?: boolean; + deviceSettingsTableId?: boolean; + userDevicesTable?: boolean; + deviceSettingsTable?: boolean; + database?: { + select: DatabaseSelect; + }; + deviceSettingsTableByDeviceSettingsTableId?: { + select: TableSelect; + }; + schema?: { + select: SchemaSelect; + }; + userDevicesTableByUserDevicesTableId?: { + select: TableSelect; + }; +}; +export type UserConnectedAccountSelect = { + id?: boolean; + ownerId?: boolean; + service?: boolean; + identifier?: boolean; + details?: boolean; + isVerified?: boolean; + createdAt?: boolean; + updatedAt?: boolean; }; export type AppMembershipDefaultSelect = { id?: boolean; @@ -5317,6 +5710,14 @@ export type RateLimitsModuleSelect = { select: SchemaSelect; }; }; +export type MembershipTypeSelect = { + id?: boolean; + name?: boolean; + description?: boolean; + prefix?: boolean; + parentMembershipType?: boolean; + hasUsersTableEntry?: boolean; +}; export type OrgMembershipDefaultSelect = { id?: boolean; createdAt?: boolean; @@ -5500,6 +5901,18 @@ export type UserSelect = { filter?: OrgOwnerGrantFilter; orderBy?: OrgOwnerGrantOrderBy[]; }; + orgMemberProfilesByActorId?: { + select: OrgMemberProfileSelect; + first?: number; + filter?: OrgMemberProfileFilter; + orderBy?: OrgMemberProfileOrderBy[]; + }; + orgMemberProfilesByEntityId?: { + select: OrgMemberProfileSelect; + first?: number; + filter?: OrgMemberProfileFilter; + orderBy?: OrgMemberProfileOrderBy[]; + }; orgGrantsByActorId?: { select: OrgGrantSelect; first?: number; @@ -5620,12 +6033,6 @@ export type UserSelect = { filter?: CryptoAddressFilter; orderBy?: CryptoAddressOrderBy[]; }; - ownedConnectedAccounts?: { - select: ConnectedAccountSelect; - first?: number; - filter?: ConnectedAccountFilter; - orderBy?: ConnectedAccountOrderBy[]; - }; appInvitesBySenderId?: { select: AppInviteSelect; first?: number; @@ -5713,6 +6120,7 @@ export type AppMembershipSelect = { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: boolean; @@ -5980,6 +6388,10 @@ export interface DatabaseFilter { embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: DatabaseToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `databaseTransfers` relation. */ databaseTransfers?: DatabaseToManyDatabaseTransferFilter; /** `databaseTransfers` exist. */ @@ -6104,10 +6516,6 @@ export interface DatabaseFilter { hierarchyModule?: HierarchyModuleFilter; /** A related `hierarchyModule` exists. */ hierarchyModuleExists?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: DatabaseToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: DatabaseToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -6128,10 +6536,26 @@ export interface DatabaseFilter { storageModules?: DatabaseToManyStorageModuleFilter; /** `storageModules` exist. */ storageModulesExist?: boolean; + /** Filter by the object’s `entityTypeProvisions` relation. */ + entityTypeProvisions?: DatabaseToManyEntityTypeProvisionFilter; + /** `entityTypeProvisions` exist. */ + entityTypeProvisionsExist?: boolean; /** Filter by the object’s `rateLimitsModule` relation. */ rateLimitsModule?: RateLimitsModuleFilter; /** A related `rateLimitsModule` exists. */ rateLimitsModuleExists?: boolean; + /** Filter by the object’s `devicesModule` relation. */ + devicesModule?: DevicesModuleFilter; + /** A related `devicesModule` exists. */ + devicesModuleExists?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: DatabaseToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; + /** Filter by the object’s `webauthnCredentialsModules` relation. */ + webauthnCredentialsModules?: DatabaseToManyWebauthnCredentialsModuleFilter; + /** `webauthnCredentialsModules` exist. */ + webauthnCredentialsModulesExist?: boolean; /** Filter by the object’s `databaseProvisionModules` relation. */ databaseProvisionModules?: DatabaseToManyDatabaseProvisionModuleFilter; /** `databaseProvisionModules` exist. */ @@ -6198,14 +6622,10 @@ export interface SchemaFilter { apiSchemas?: SchemaToManyApiSchemaFilter; /** `apiSchemas` exist. */ apiSchemasExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByPrivateSchemaId` relation. */ - tableTemplateModulesByPrivateSchemaId?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByPrivateSchemaId` exist. */ - tableTemplateModulesByPrivateSchemaIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: SchemaToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } export interface TableFilter { /** Filter by the object’s `id` field. */ @@ -6316,14 +6736,14 @@ export interface TableFilter { embeddingChunks?: TableToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByOwnerTableId` relation. */ - tableTemplateModulesByOwnerTableId?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByOwnerTableId` exist. */ - tableTemplateModulesByOwnerTableIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefTableId` relation. */ + spatialRelationsByRefTableId?: TableToManySpatialRelationFilter; + /** `spatialRelationsByRefTableId` exist. */ + spatialRelationsByRefTableIdExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: TableToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: TableToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -6336,6 +6756,14 @@ export interface TableFilter { relationProvisionsByTargetTableId?: TableToManyRelationProvisionFilter; /** `relationProvisionsByTargetTableId` exist. */ relationProvisionsByTargetTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModulesBySessionsTableId` relation. */ + sessionSecretsModulesBySessionsTableId?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModulesBySessionsTableId` exist. */ + sessionSecretsModulesBySessionsTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } export interface CheckConstraintFilter { /** Filter by the object’s `id` field. */ @@ -6436,6 +6864,62 @@ export interface FieldFilter { database?: DatabaseFilter; /** Filter by the object’s `table` relation. */ table?: TableFilter; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: FieldToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefFieldId` relation. */ + spatialRelationsByRefFieldId?: FieldToManySpatialRelationFilter; + /** `spatialRelationsByRefFieldId` exist. */ + spatialRelationsByRefFieldIdExist?: boolean; +} +export interface SpatialRelationFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `refTableId` field. */ + refTableId?: UUIDFilter; + /** Filter by the object’s `refFieldId` field. */ + refFieldId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `operator` field. */ + operator?: StringFilter; + /** Filter by the object’s `paramName` field. */ + paramName?: StringFilter; + /** Filter by the object’s `category` field. */ + category?: ObjectCategoryFilter; + /** Filter by the object’s `module` field. */ + module?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: IntFilter; + /** Filter by the object’s `tags` field. */ + tags?: StringListFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: SpatialRelationFilter[]; + /** Checks for any expressions in this list. */ + or?: SpatialRelationFilter[]; + /** Negates the expression. */ + not?: SpatialRelationFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `field` relation. */ + field?: FieldFilter; + /** Filter by the object’s `refField` relation. */ + refField?: FieldFilter; + /** Filter by the object’s `refTable` relation. */ + refTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; } export interface ForeignKeyConstraintFilter { /** Filter by the object’s `id` field. */ @@ -6949,42 +7433,6 @@ export interface EmbeddingChunkFilter { /** Filter by the object’s `table` relation. */ table?: TableFilter; } -export interface TableTemplateModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `ownerTableId` field. */ - ownerTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; - /** Filter by the object’s `nodeType` field. */ - nodeType?: StringFilter; - /** Filter by the object’s `data` field. */ - data?: JSONFilter; - /** Checks for all expressions in this list. */ - and?: TableTemplateModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: TableTemplateModuleFilter[]; - /** Negates the expression. */ - not?: TableTemplateModuleFilter; - /** Filter by the object’s `database` relation. */ - database?: DatabaseFilter; - /** Filter by the object’s `ownerTable` relation. */ - ownerTable?: TableFilter; - /** Filter by the object’s `privateSchema` relation. */ - privateSchema?: SchemaFilter; - /** Filter by the object’s `schema` relation. */ - schema?: SchemaFilter; - /** Filter by the object’s `table` relation. */ - table?: TableFilter; -} export interface SecureTableProvisionFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -7107,6 +7555,34 @@ export interface RelationProvisionFilter { /** Filter by the object’s `targetTable` relation. */ targetTable?: TableFilter; } +export interface SessionSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: SessionSecretsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: SessionSecretsModuleFilter[]; + /** Negates the expression. */ + not?: SessionSecretsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `sessionsTable` relation. */ + sessionsTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} export interface SchemaGrantFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -8010,6 +8486,8 @@ export interface MembershipsModuleFilter { entityIdsByPerm?: StringFilter; /** Filter by the object’s `entityIdsFunction` field. */ entityIdsFunction?: StringFilter; + /** Filter by the object’s `memberProfilesTableId` field. */ + memberProfilesTableId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: MembershipsModuleFilter[]; /** Checks for any expressions in this list. */ @@ -8322,10 +8800,10 @@ export interface UserAuthModuleFilter { sendAccountDeletionEmailFunction?: StringFilter; /** Filter by the object’s `deleteAccountFunction` field. */ deleteAccountFunction?: StringFilter; - /** Filter by the object’s `signInOneTimeTokenFunction` field. */ - signInOneTimeTokenFunction?: StringFilter; - /** Filter by the object’s `oneTimeTokenFunction` field. */ - oneTimeTokenFunction?: StringFilter; + /** Filter by the object’s `signInCrossOriginFunction` field. */ + signInCrossOriginFunction?: StringFilter; + /** Filter by the object’s `requestCrossOriginTokenFunction` field. */ + requestCrossOriginTokenFunction?: StringFilter; /** Filter by the object’s `extendTokenExpires` field. */ extendTokenExpires?: StringFilter; /** Checks for all expressions in this list. */ @@ -8581,6 +9059,82 @@ export interface StorageModuleFilter { /** Filter by the object’s `uploadRequestsTable` relation. */ uploadRequestsTable?: TableFilter; } +export interface EntityTypeProvisionFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `parentEntity` field. */ + parentEntity?: StringFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `isVisible` field. */ + isVisible?: BooleanFilter; + /** Filter by the object’s `hasLimits` field. */ + hasLimits?: BooleanFilter; + /** Filter by the object’s `hasProfiles` field. */ + hasProfiles?: BooleanFilter; + /** Filter by the object’s `hasLevels` field. */ + hasLevels?: BooleanFilter; + /** Filter by the object’s `skipEntityPolicies` field. */ + skipEntityPolicies?: BooleanFilter; + /** Filter by the object’s `tableProvision` field. */ + tableProvision?: JSONFilter; + /** Filter by the object’s `outMembershipType` field. */ + outMembershipType?: IntFilter; + /** Filter by the object’s `outEntityTableId` field. */ + outEntityTableId?: UUIDFilter; + /** Filter by the object’s `outEntityTableName` field. */ + outEntityTableName?: StringFilter; + /** Filter by the object’s `outInstalledModules` field. */ + outInstalledModules?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: EntityTypeProvisionFilter[]; + /** Checks for any expressions in this list. */ + or?: EntityTypeProvisionFilter[]; + /** Negates the expression. */ + not?: EntityTypeProvisionFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; +} +export interface WebauthnCredentialsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: WebauthnCredentialsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: WebauthnCredentialsModuleFilter[]; + /** Negates the expression. */ + not?: WebauthnCredentialsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `ownerTable` relation. */ + ownerTable?: TableFilter; + /** Filter by the object’s `privateSchema` relation. */ + privateSchema?: SchemaFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} export interface DatabaseProvisionModuleFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -8720,6 +9274,8 @@ export interface OrgMembershipFilter { isDisabled?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -8732,6 +9288,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ @@ -8744,6 +9302,10 @@ export interface OrgMembershipFilter { actor?: UserFilter; /** Filter by the object’s `entity` relation. */ entity?: UserFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; } export interface OrgMemberFilter { /** Filter by the object’s `id` field. */ @@ -8825,6 +9387,42 @@ export interface OrgOwnerGrantFilter { /** A related `grantor` exists. */ grantorExists?: boolean; } +export interface OrgMemberProfileFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Filter by the object’s `actor` relation. */ + actor?: UserFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; +} export interface OrgGrantFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -9131,32 +9729,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} export interface AppInviteFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -9417,21 +9989,59 @@ export interface OrgLimitDefaultFilter { /** Negates the expression. */ not?: OrgLimitDefaultFilter; } -export interface MembershipTypeFilter { +export interface DevicesModuleFilter { /** Filter by the object’s `id` field. */ - id?: IntFilter; - /** Filter by the object’s `name` field. */ - name?: StringFilter; - /** Filter by the object’s `description` field. */ - description?: StringFilter; - /** Filter by the object’s `prefix` field. */ - prefix?: StringFilter; + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `userDevicesTableId` field. */ + userDevicesTableId?: UUIDFilter; + /** Filter by the object’s `deviceSettingsTableId` field. */ + deviceSettingsTableId?: UUIDFilter; + /** Filter by the object’s `userDevicesTable` field. */ + userDevicesTable?: StringFilter; + /** Filter by the object’s `deviceSettingsTable` field. */ + deviceSettingsTable?: StringFilter; /** Checks for all expressions in this list. */ - and?: MembershipTypeFilter[]; + and?: DevicesModuleFilter[]; /** Checks for any expressions in this list. */ - or?: MembershipTypeFilter[]; + or?: DevicesModuleFilter[]; /** Negates the expression. */ - not?: MembershipTypeFilter; + not?: DevicesModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `deviceSettingsTableByDeviceSettingsTableId` relation. */ + deviceSettingsTableByDeviceSettingsTableId?: TableFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `userDevicesTableByUserDevicesTableId` relation. */ + userDevicesTableByUserDevicesTableId?: TableFilter; +} +export interface UserConnectedAccountFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `ownerId` field. */ + ownerId?: UUIDFilter; + /** Filter by the object’s `service` field. */ + service?: StringFilter; + /** Filter by the object’s `identifier` field. */ + identifier?: StringFilter; + /** Filter by the object’s `details` field. */ + details?: JSONFilter; + /** Filter by the object’s `isVerified` field. */ + isVerified?: BooleanFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: UserConnectedAccountFilter[]; + /** Checks for any expressions in this list. */ + or?: UserConnectedAccountFilter[]; + /** Negates the expression. */ + not?: UserConnectedAccountFilter; } export interface AppMembershipDefaultFilter { /** Filter by the object’s `id` field. */ @@ -9517,6 +10127,26 @@ export interface RateLimitsModuleFilter { /** Filter by the object’s `schema` relation. */ schema?: SchemaFilter; } +export interface MembershipTypeFilter { + /** Filter by the object’s `id` field. */ + id?: IntFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `parentMembershipType` field. */ + parentMembershipType?: IntFilter; + /** Filter by the object’s `hasUsersTableEntry` field. */ + hasUsersTableEntry?: BooleanFilter; + /** Checks for all expressions in this list. */ + and?: MembershipTypeFilter[]; + /** Checks for any expressions in this list. */ + or?: MembershipTypeFilter[]; + /** Negates the expression. */ + not?: MembershipTypeFilter; +} export interface OrgMembershipDefaultFilter { /** Filter by the object’s `id` field. */ id?: UUIDFilter; @@ -9720,6 +10350,14 @@ export interface UserFilter { orgOwnerGrantsByGrantorId?: UserToManyOrgOwnerGrantFilter; /** `orgOwnerGrantsByGrantorId` exist. */ orgOwnerGrantsByGrantorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByActorId` relation. */ + orgMemberProfilesByActorId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByActorId` exist. */ + orgMemberProfilesByActorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByEntityId` relation. */ + orgMemberProfilesByEntityId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByEntityId` exist. */ + orgMemberProfilesByEntityIdExist?: boolean; /** Filter by the object’s `orgGrantsByActorId` relation. */ orgGrantsByActorId?: UserToManyOrgGrantFilter; /** `orgGrantsByActorId` exist. */ @@ -9800,10 +10438,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `appInvitesBySenderId` relation. */ appInvitesBySenderId?: UserToManyAppInviteFilter; /** `appInvitesBySenderId` exist. */ @@ -9911,6 +10545,8 @@ export interface AppMembershipFilter { isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -10265,6 +10901,40 @@ export type FieldOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type SpatialRelationOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'FIELD_ID_ASC' + | 'FIELD_ID_DESC' + | 'REF_TABLE_ID_ASC' + | 'REF_TABLE_ID_DESC' + | 'REF_FIELD_ID_ASC' + | 'REF_FIELD_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'OPERATOR_ASC' + | 'OPERATOR_DESC' + | 'PARAM_NAME_ASC' + | 'PARAM_NAME_DESC' + | 'CATEGORY_ASC' + | 'CATEGORY_DESC' + | 'MODULE_ASC' + | 'MODULE_DESC' + | 'SCOPE_ASC' + | 'SCOPE_DESC' + | 'TAGS_ASC' + | 'TAGS_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type ForeignKeyConstraintOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -10643,28 +11313,6 @@ export type EmbeddingChunkOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type TableTemplateModuleOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'DATABASE_ID_ASC' - | 'DATABASE_ID_DESC' - | 'SCHEMA_ID_ASC' - | 'SCHEMA_ID_DESC' - | 'PRIVATE_SCHEMA_ID_ASC' - | 'PRIVATE_SCHEMA_ID_DESC' - | 'TABLE_ID_ASC' - | 'TABLE_ID_DESC' - | 'OWNER_TABLE_ID_ASC' - | 'OWNER_TABLE_ID_DESC' - | 'TABLE_NAME_ASC' - | 'TABLE_NAME_DESC' - | 'NODE_TYPE_ASC' - | 'NODE_TYPE_DESC' - | 'DATA_ASC' - | 'DATA_DESC'; export type SecureTableProvisionOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -10767,6 +11415,22 @@ export type RelationProvisionOrderBy = | 'OUT_SOURCE_FIELD_ID_DESC' | 'OUT_TARGET_FIELD_ID_ASC' | 'OUT_TARGET_FIELD_ID_DESC'; +export type SessionSecretsModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'SESSIONS_TABLE_ID_ASC' + | 'SESSIONS_TABLE_ID_DESC'; export type SchemaGrantOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -11368,7 +12032,9 @@ export type MembershipsModuleOrderBy = | 'ENTITY_IDS_BY_PERM_ASC' | 'ENTITY_IDS_BY_PERM_DESC' | 'ENTITY_IDS_FUNCTION_ASC' - | 'ENTITY_IDS_FUNCTION_DESC'; + | 'ENTITY_IDS_FUNCTION_DESC' + | 'MEMBER_PROFILES_TABLE_ID_ASC' + | 'MEMBER_PROFILES_TABLE_ID_DESC'; export type PermissionsModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -11555,10 +12221,10 @@ export type UserAuthModuleOrderBy = | 'SEND_ACCOUNT_DELETION_EMAIL_FUNCTION_DESC' | 'DELETE_ACCOUNT_FUNCTION_ASC' | 'DELETE_ACCOUNT_FUNCTION_DESC' - | 'SIGN_IN_ONE_TIME_TOKEN_FUNCTION_ASC' - | 'SIGN_IN_ONE_TIME_TOKEN_FUNCTION_DESC' - | 'ONE_TIME_TOKEN_FUNCTION_ASC' - | 'ONE_TIME_TOKEN_FUNCTION_DESC' + | 'SIGN_IN_CROSS_ORIGIN_FUNCTION_ASC' + | 'SIGN_IN_CROSS_ORIGIN_FUNCTION_DESC' + | 'REQUEST_CROSS_ORIGIN_TOKEN_FUNCTION_ASC' + | 'REQUEST_CROSS_ORIGIN_TOKEN_FUNCTION_DESC' | 'EXTEND_TOKEN_EXPIRES_ASC' | 'EXTEND_TOKEN_EXPIRES_DESC'; export type UsersModuleOrderBy = @@ -11721,6 +12387,62 @@ export type StorageModuleOrderBy = | 'MAX_FILENAME_LENGTH_DESC' | 'CACHE_TTL_SECONDS_ASC' | 'CACHE_TTL_SECONDS_DESC'; +export type EntityTypeProvisionOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PARENT_ENTITY_ASC' + | 'PARENT_ENTITY_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC' + | 'IS_VISIBLE_ASC' + | 'IS_VISIBLE_DESC' + | 'HAS_LIMITS_ASC' + | 'HAS_LIMITS_DESC' + | 'HAS_PROFILES_ASC' + | 'HAS_PROFILES_DESC' + | 'HAS_LEVELS_ASC' + | 'HAS_LEVELS_DESC' + | 'SKIP_ENTITY_POLICIES_ASC' + | 'SKIP_ENTITY_POLICIES_DESC' + | 'TABLE_PROVISION_ASC' + | 'TABLE_PROVISION_DESC' + | 'OUT_MEMBERSHIP_TYPE_ASC' + | 'OUT_MEMBERSHIP_TYPE_DESC' + | 'OUT_ENTITY_TABLE_ID_ASC' + | 'OUT_ENTITY_TABLE_ID_DESC' + | 'OUT_ENTITY_TABLE_NAME_ASC' + | 'OUT_ENTITY_TABLE_NAME_DESC' + | 'OUT_INSTALLED_MODULES_ASC' + | 'OUT_INSTALLED_MODULES_DESC'; +export type WebauthnCredentialsModuleOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'PRIVATE_SCHEMA_ID_ASC' + | 'PRIVATE_SCHEMA_ID_DESC' + | 'TABLE_ID_ASC' + | 'TABLE_ID_DESC' + | 'OWNER_TABLE_ID_ASC' + | 'OWNER_TABLE_ID_DESC' + | 'TABLE_NAME_ASC' + | 'TABLE_NAME_DESC'; export type DatabaseProvisionModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -11825,6 +12547,8 @@ export type OrgMembershipOrderBy = | 'IS_DISABLED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -11837,6 +12561,8 @@ export type OrgMembershipOrderBy = | 'ACTOR_ID_DESC' | 'ENTITY_ID_ASC' | 'ENTITY_ID_DESC' + | 'IS_READ_ONLY_ASC' + | 'IS_READ_ONLY_DESC' | 'PROFILE_ID_ASC' | 'PROFILE_ID_DESC'; export type OrgMemberOrderBy = @@ -11887,6 +12613,32 @@ export type OrgOwnerGrantOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; +export type OrgMemberProfileOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC' + | 'MEMBERSHIP_ID_ASC' + | 'MEMBERSHIP_ID_DESC' + | 'ENTITY_ID_ASC' + | 'ENTITY_ID_DESC' + | 'ACTOR_ID_ASC' + | 'ACTOR_ID_DESC' + | 'DISPLAY_NAME_ASC' + | 'DISPLAY_NAME_DESC' + | 'EMAIL_ASC' + | 'EMAIL_DESC' + | 'TITLE_ASC' + | 'TITLE_DESC' + | 'BIO_ASC' + | 'BIO_DESC' + | 'PROFILE_PICTURE_ASC' + | 'PROFILE_PICTURE_DESC'; export type OrgGrantOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12095,26 +12847,6 @@ export type CryptoAddressOrderBy = | 'CREATED_AT_DESC' | 'UPDATED_AT_ASC' | 'UPDATED_AT_DESC'; -export type ConnectedAccountOrderBy = - | 'NATURAL' - | 'PRIMARY_KEY_ASC' - | 'PRIMARY_KEY_DESC' - | 'ID_ASC' - | 'ID_DESC' - | 'OWNER_ID_ASC' - | 'OWNER_ID_DESC' - | 'SERVICE_ASC' - | 'SERVICE_DESC' - | 'IDENTIFIER_ASC' - | 'IDENTIFIER_DESC' - | 'DETAILS_ASC' - | 'DETAILS_DESC' - | 'IS_VERIFIED_ASC' - | 'IS_VERIFIED_DESC' - | 'CREATED_AT_ASC' - | 'CREATED_AT_DESC' - | 'UPDATED_AT_ASC' - | 'UPDATED_AT_DESC'; export type AppInviteOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12301,18 +13033,42 @@ export type OrgLimitDefaultOrderBy = | 'NAME_DESC' | 'MAX_ASC' | 'MAX_DESC'; -export type MembershipTypeOrderBy = +export type DevicesModuleOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' | 'PRIMARY_KEY_DESC' | 'ID_ASC' | 'ID_DESC' - | 'NAME_ASC' - | 'NAME_DESC' - | 'DESCRIPTION_ASC' - | 'DESCRIPTION_DESC' - | 'PREFIX_ASC' - | 'PREFIX_DESC'; + | 'DATABASE_ID_ASC' + | 'DATABASE_ID_DESC' + | 'SCHEMA_ID_ASC' + | 'SCHEMA_ID_DESC' + | 'USER_DEVICES_TABLE_ID_ASC' + | 'USER_DEVICES_TABLE_ID_DESC' + | 'DEVICE_SETTINGS_TABLE_ID_ASC' + | 'DEVICE_SETTINGS_TABLE_ID_DESC' + | 'USER_DEVICES_TABLE_ASC' + | 'USER_DEVICES_TABLE_DESC' + | 'DEVICE_SETTINGS_TABLE_ASC' + | 'DEVICE_SETTINGS_TABLE_DESC'; +export type UserConnectedAccountOrderBy = + | 'NATURAL' + | 'ID_ASC' + | 'ID_DESC' + | 'OWNER_ID_ASC' + | 'OWNER_ID_DESC' + | 'SERVICE_ASC' + | 'SERVICE_DESC' + | 'IDENTIFIER_ASC' + | 'IDENTIFIER_DESC' + | 'DETAILS_ASC' + | 'DETAILS_DESC' + | 'IS_VERIFIED_ASC' + | 'IS_VERIFIED_DESC' + | 'CREATED_AT_ASC' + | 'CREATED_AT_DESC' + | 'UPDATED_AT_ASC' + | 'UPDATED_AT_DESC'; export type AppMembershipDefaultOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12375,6 +13131,22 @@ export type RateLimitsModuleOrderBy = | 'IP_RATE_LIMITS_TABLE_DESC' | 'RATE_LIMITS_TABLE_ASC' | 'RATE_LIMITS_TABLE_DESC'; +export type MembershipTypeOrderBy = + | 'NATURAL' + | 'PRIMARY_KEY_ASC' + | 'PRIMARY_KEY_DESC' + | 'ID_ASC' + | 'ID_DESC' + | 'NAME_ASC' + | 'NAME_DESC' + | 'DESCRIPTION_ASC' + | 'DESCRIPTION_DESC' + | 'PREFIX_ASC' + | 'PREFIX_DESC' + | 'PARENT_MEMBERSHIP_TYPE_ASC' + | 'PARENT_MEMBERSHIP_TYPE_DESC' + | 'HAS_USERS_TABLE_ENTRY_ASC' + | 'HAS_USERS_TABLE_ENTRY_DESC'; export type OrgMembershipDefaultOrderBy = | 'NATURAL' | 'PRIMARY_KEY_ASC' @@ -12529,6 +13301,8 @@ export type AppMembershipOrderBy = | 'IS_VERIFIED_DESC' | 'IS_ACTIVE_ASC' | 'IS_ACTIVE_DESC' + | 'IS_EXTERNAL_ASC' + | 'IS_EXTERNAL_DESC' | 'IS_OWNER_ASC' | 'IS_OWNER_DESC' | 'IS_ADMIN_ASC' @@ -12954,6 +13728,46 @@ export interface DeleteFieldInput { clientMutationId?: string; id: string; } +export interface CreateSpatialRelationInput { + clientMutationId?: string; + spatialRelation: { + databaseId?: string; + tableId: string; + fieldId: string; + refTableId: string; + refFieldId: string; + name: string; + operator: string; + paramName?: string; + category?: ObjectCategory; + module?: string; + scope?: number; + tags?: string[]; + }; +} +export interface SpatialRelationPatch { + databaseId?: string | null; + tableId?: string | null; + fieldId?: string | null; + refTableId?: string | null; + refFieldId?: string | null; + name?: string | null; + operator?: string | null; + paramName?: string | null; + category?: ObjectCategory | null; + module?: string | null; + scope?: number | null; + tags?: string[] | null; +} +export interface UpdateSpatialRelationInput { + clientMutationId?: string; + id: string; + spatialRelationPatch: SpatialRelationPatch; +} +export interface DeleteSpatialRelationInput { + clientMutationId?: string; + id: string; +} export interface CreateForeignKeyConstraintInput { clientMutationId?: string; foreignKeyConstraint: { @@ -13426,38 +14240,6 @@ export interface DeleteEmbeddingChunkInput { clientMutationId?: string; id: string; } -export interface CreateTableTemplateModuleInput { - clientMutationId?: string; - tableTemplateModule: { - databaseId: string; - schemaId?: string; - privateSchemaId?: string; - tableId?: string; - ownerTableId?: string; - tableName: string; - nodeType: string; - data?: Record; - }; -} -export interface TableTemplateModulePatch { - databaseId?: string | null; - schemaId?: string | null; - privateSchemaId?: string | null; - tableId?: string | null; - ownerTableId?: string | null; - tableName?: string | null; - nodeType?: string | null; - data?: Record | null; -} -export interface UpdateTableTemplateModuleInput { - clientMutationId?: string; - id: string; - tableTemplateModulePatch: TableTemplateModulePatch; -} -export interface DeleteTableTemplateModuleInput { - clientMutationId?: string; - id: string; -} export interface CreateSecureTableProvisionInput { clientMutationId?: string; secureTableProvision: { @@ -13571,12 +14353,38 @@ export interface RelationProvisionPatch { outSourceFieldId?: string | null; outTargetFieldId?: string | null; } -export interface UpdateRelationProvisionInput { +export interface UpdateRelationProvisionInput { + clientMutationId?: string; + id: string; + relationProvisionPatch: RelationProvisionPatch; +} +export interface DeleteRelationProvisionInput { + clientMutationId?: string; + id: string; +} +export interface CreateSessionSecretsModuleInput { + clientMutationId?: string; + sessionSecretsModule: { + databaseId: string; + schemaId?: string; + tableId?: string; + tableName?: string; + sessionsTableId?: string; + }; +} +export interface SessionSecretsModulePatch { + databaseId?: string | null; + schemaId?: string | null; + tableId?: string | null; + tableName?: string | null; + sessionsTableId?: string | null; +} +export interface UpdateSessionSecretsModuleInput { clientMutationId?: string; id: string; - relationProvisionPatch: RelationProvisionPatch; + sessionSecretsModulePatch: SessionSecretsModulePatch; } -export interface DeleteRelationProvisionInput { +export interface DeleteSessionSecretsModuleInput { clientMutationId?: string; id: string; } @@ -14393,6 +15201,7 @@ export interface CreateMembershipsModuleInput { entityIdsByMask?: string; entityIdsByPerm?: string; entityIdsFunction?: string; + memberProfilesTableId?: string; }; } export interface MembershipsModulePatch { @@ -14426,6 +15235,7 @@ export interface MembershipsModulePatch { entityIdsByMask?: string | null; entityIdsByPerm?: string | null; entityIdsFunction?: string | null; + memberProfilesTableId?: string | null; } export interface UpdateMembershipsModuleInput { clientMutationId?: string; @@ -14647,8 +15457,8 @@ export interface CreateUserAuthModuleInput { checkPasswordFunction?: string; sendAccountDeletionEmailFunction?: string; deleteAccountFunction?: string; - signInOneTimeTokenFunction?: string; - oneTimeTokenFunction?: string; + signInCrossOriginFunction?: string; + requestCrossOriginTokenFunction?: string; extendTokenExpires?: string; }; } @@ -14675,8 +15485,8 @@ export interface UserAuthModulePatch { checkPasswordFunction?: string | null; sendAccountDeletionEmailFunction?: string | null; deleteAccountFunction?: string | null; - signInOneTimeTokenFunction?: string | null; - oneTimeTokenFunction?: string | null; + signInCrossOriginFunction?: string | null; + requestCrossOriginTokenFunction?: string | null; extendTokenExpires?: string | null; } export interface UpdateUserAuthModuleInput { @@ -14886,6 +15696,82 @@ export interface DeleteStorageModuleInput { clientMutationId?: string; id: string; } +export interface CreateEntityTypeProvisionInput { + clientMutationId?: string; + entityTypeProvision: { + databaseId: string; + name: string; + prefix: string; + description?: string; + parentEntity?: string; + tableName?: string; + isVisible?: boolean; + hasLimits?: boolean; + hasProfiles?: boolean; + hasLevels?: boolean; + skipEntityPolicies?: boolean; + tableProvision?: Record; + outMembershipType?: number; + outEntityTableId?: string; + outEntityTableName?: string; + outInstalledModules?: string[]; + }; +} +export interface EntityTypeProvisionPatch { + databaseId?: string | null; + name?: string | null; + prefix?: string | null; + description?: string | null; + parentEntity?: string | null; + tableName?: string | null; + isVisible?: boolean | null; + hasLimits?: boolean | null; + hasProfiles?: boolean | null; + hasLevels?: boolean | null; + skipEntityPolicies?: boolean | null; + tableProvision?: Record | null; + outMembershipType?: number | null; + outEntityTableId?: string | null; + outEntityTableName?: string | null; + outInstalledModules?: string[] | null; +} +export interface UpdateEntityTypeProvisionInput { + clientMutationId?: string; + id: string; + entityTypeProvisionPatch: EntityTypeProvisionPatch; +} +export interface DeleteEntityTypeProvisionInput { + clientMutationId?: string; + id: string; +} +export interface CreateWebauthnCredentialsModuleInput { + clientMutationId?: string; + webauthnCredentialsModule: { + databaseId: string; + schemaId?: string; + privateSchemaId?: string; + tableId?: string; + ownerTableId?: string; + tableName?: string; + }; +} +export interface WebauthnCredentialsModulePatch { + databaseId?: string | null; + schemaId?: string | null; + privateSchemaId?: string | null; + tableId?: string | null; + ownerTableId?: string | null; + tableName?: string | null; +} +export interface UpdateWebauthnCredentialsModuleInput { + clientMutationId?: string; + id: string; + webauthnCredentialsModulePatch: WebauthnCredentialsModulePatch; +} +export interface DeleteWebauthnCredentialsModuleInput { + clientMutationId?: string; + id: string; +} export interface CreateDatabaseProvisionModuleInput { clientMutationId?: string; databaseProvisionModule: { @@ -15001,12 +15887,14 @@ export interface CreateOrgMembershipInput { isBanned?: boolean; isDisabled?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; granted?: string; actorId: string; entityId: string; + isReadOnly?: boolean; profileId?: string; }; } @@ -15017,12 +15905,14 @@ export interface OrgMembershipPatch { isBanned?: boolean | null; isDisabled?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; granted?: string | null; actorId?: string | null; entityId?: string | null; + isReadOnly?: boolean | null; profileId?: string | null; } export interface UpdateOrgMembershipInput { @@ -15104,6 +15994,39 @@ export interface DeleteOrgOwnerGrantInput { clientMutationId?: string; id: string; } +export interface CreateOrgMemberProfileInput { + clientMutationId?: string; + orgMemberProfile: { + membershipId: string; + entityId: string; + actorId: string; + displayName?: string; + email?: string; + title?: string; + bio?: string; + profilePicture?: ConstructiveInternalTypeImage; + }; +} +export interface OrgMemberProfilePatch { + membershipId?: string | null; + entityId?: string | null; + actorId?: string | null; + displayName?: string | null; + email?: string | null; + title?: string | null; + bio?: string | null; + profilePicture?: ConstructiveInternalTypeImage | null; + profilePictureUpload?: File | null; +} +export interface UpdateOrgMemberProfileInput { + clientMutationId?: string; + id: string; + orgMemberProfilePatch: OrgMemberProfilePatch; +} +export interface DeleteOrgMemberProfileInput { + clientMutationId?: string; + id: string; +} export interface CreateOrgGrantInput { clientMutationId?: string; orgGrant: { @@ -15399,32 +16322,6 @@ export interface DeleteCryptoAddressInput { clientMutationId?: string; id: string; } -export interface CreateConnectedAccountInput { - clientMutationId?: string; - connectedAccount: { - ownerId?: string; - service: string; - identifier: string; - details: Record; - isVerified?: boolean; - }; -} -export interface ConnectedAccountPatch { - ownerId?: string | null; - service?: string | null; - identifier?: string | null; - details?: Record | null; - isVerified?: boolean | null; -} -export interface UpdateConnectedAccountInput { - clientMutationId?: string; - id: string; - connectedAccountPatch: ConnectedAccountPatch; -} -export interface DeleteConnectedAccountInput { - clientMutationId?: string; - id: string; -} export interface CreateAppInviteInput { clientMutationId?: string; appInvite: { @@ -15713,27 +16610,59 @@ export interface DeleteOrgLimitDefaultInput { clientMutationId?: string; id: string; } -export interface CreateMembershipTypeInput { +export interface CreateDevicesModuleInput { clientMutationId?: string; - membershipType: { - name: string; - description: string; - prefix: string; + devicesModule: { + databaseId: string; + schemaId?: string; + userDevicesTableId?: string; + deviceSettingsTableId?: string; + userDevicesTable?: string; + deviceSettingsTable?: string; }; } -export interface MembershipTypePatch { - name?: string | null; - description?: string | null; - prefix?: string | null; +export interface DevicesModulePatch { + databaseId?: string | null; + schemaId?: string | null; + userDevicesTableId?: string | null; + deviceSettingsTableId?: string | null; + userDevicesTable?: string | null; + deviceSettingsTable?: string | null; } -export interface UpdateMembershipTypeInput { +export interface UpdateDevicesModuleInput { clientMutationId?: string; - id: number; - membershipTypePatch: MembershipTypePatch; + id: string; + devicesModulePatch: DevicesModulePatch; } -export interface DeleteMembershipTypeInput { +export interface DeleteDevicesModuleInput { clientMutationId?: string; - id: number; + id: string; +} +export interface CreateUserConnectedAccountInput { + clientMutationId?: string; + userConnectedAccount: { + ownerId?: string; + service?: string; + identifier?: string; + details?: Record; + isVerified?: boolean; + }; +} +export interface UserConnectedAccountPatch { + ownerId?: string | null; + service?: string | null; + identifier?: string | null; + details?: Record | null; + isVerified?: boolean | null; +} +export interface UpdateUserConnectedAccountInput { + clientMutationId?: string; + id: string; + userConnectedAccountPatch: UserConnectedAccountPatch; +} +export interface DeleteUserConnectedAccountInput { + clientMutationId?: string; + id: string; } export interface CreateAppMembershipDefaultInput { clientMutationId?: string; @@ -15823,6 +16752,32 @@ export interface DeleteRateLimitsModuleInput { clientMutationId?: string; id: string; } +export interface CreateMembershipTypeInput { + clientMutationId?: string; + membershipType: { + name: string; + description: string; + prefix: string; + parentMembershipType?: number; + hasUsersTableEntry?: boolean; + }; +} +export interface MembershipTypePatch { + name?: string | null; + description?: string | null; + prefix?: string | null; + parentMembershipType?: number | null; + hasUsersTableEntry?: boolean | null; +} +export interface UpdateMembershipTypeInput { + clientMutationId?: string; + id: number; + membershipTypePatch: MembershipTypePatch; +} +export interface DeleteMembershipTypeInput { + clientMutationId?: string; + id: number; +} export interface CreateOrgMembershipDefaultInput { clientMutationId?: string; orgMembershipDefault: { @@ -15998,6 +16953,7 @@ export interface CreateAppMembershipInput { isDisabled?: boolean; isVerified?: boolean; isActive?: boolean; + isExternal?: boolean; isOwner?: boolean; isAdmin?: boolean; permissions?: string; @@ -16014,6 +16970,7 @@ export interface AppMembershipPatch { isDisabled?: boolean | null; isVerified?: boolean | null; isActive?: boolean | null; + isExternal?: boolean | null; isOwner?: boolean | null; isAdmin?: boolean | null; permissions?: string | null; @@ -16105,6 +17062,7 @@ export const connectionFieldsMap = { defaultPrivileges: 'DefaultPrivilege', enums: 'Enum', embeddingChunks: 'EmbeddingChunk', + spatialRelations: 'SpatialRelation', databaseTransfers: 'DatabaseTransfer', apis: 'Api', apiModules: 'ApiModule', @@ -16134,12 +17092,14 @@ export const connectionFieldsMap = { sessionsModules: 'SessionsModule', userAuthModules: 'UserAuthModule', usersModules: 'UsersModule', - tableTemplateModules: 'TableTemplateModule', secureTableProvisions: 'SecureTableProvision', relationProvisions: 'RelationProvision', blueprints: 'Blueprint', blueprintConstructions: 'BlueprintConstruction', storageModules: 'StorageModule', + entityTypeProvisions: 'EntityTypeProvision', + sessionSecretsModules: 'SessionSecretsModule', + webauthnCredentialsModules: 'WebauthnCredentialsModule', databaseProvisionModules: 'DatabaseProvisionModule', }, Schema: { @@ -16149,8 +17109,7 @@ export const connectionFieldsMap = { defaultPrivileges: 'DefaultPrivilege', enums: 'Enum', apiSchemas: 'ApiSchema', - tableTemplateModulesByPrivateSchemaId: 'TableTemplateModule', - tableTemplateModules: 'TableTemplateModule', + sessionSecretsModules: 'SessionSecretsModule', }, Table: { checkConstraints: 'CheckConstraint', @@ -16167,11 +17126,17 @@ export const connectionFieldsMap = { viewTables: 'ViewTable', embeddingChunksByChunksTableId: 'EmbeddingChunk', embeddingChunks: 'EmbeddingChunk', - tableTemplateModulesByOwnerTableId: 'TableTemplateModule', - tableTemplateModules: 'TableTemplateModule', + spatialRelationsByRefTableId: 'SpatialRelation', + spatialRelations: 'SpatialRelation', secureTableProvisions: 'SecureTableProvision', relationProvisionsBySourceTableId: 'RelationProvision', relationProvisionsByTargetTableId: 'RelationProvision', + sessionSecretsModulesBySessionsTableId: 'SessionSecretsModule', + sessionSecretsModules: 'SessionSecretsModule', + }, + Field: { + spatialRelations: 'SpatialRelation', + spatialRelationsByRefFieldId: 'SpatialRelation', }, View: { viewTables: 'ViewTable', @@ -16214,6 +17179,8 @@ export const connectionFieldsMap = { orgOwnerGrantsByActorId: 'OrgOwnerGrant', orgOwnerGrantsByEntityId: 'OrgOwnerGrant', orgOwnerGrantsByGrantorId: 'OrgOwnerGrant', + orgMemberProfilesByActorId: 'OrgMemberProfile', + orgMemberProfilesByEntityId: 'OrgMemberProfile', orgGrantsByActorId: 'OrgGrant', orgGrantsByEntityId: 'OrgGrant', orgGrantsByGrantorId: 'OrgGrant', @@ -16234,7 +17201,6 @@ export const connectionFieldsMap = { ownedEmails: 'Email', ownedPhoneNumbers: 'PhoneNumber', ownedCryptoAddresses: 'CryptoAddress', - ownedConnectedAccounts: 'ConnectedAccount', appInvitesBySenderId: 'AppInvite', appClaimedInvitesByReceiverId: 'AppClaimedInvite', appClaimedInvitesBySenderId: 'AppClaimedInvite', @@ -16266,6 +17232,18 @@ export interface RejectDatabaseTransferInput { clientMutationId?: string; transferId?: string; } +export interface DisconnectAccountInput { + clientMutationId?: string; + accountId: string; +} +export interface RevokeApiKeyInput { + clientMutationId?: string; + keyId: string; +} +export interface RevokeSessionInput { + clientMutationId?: string; + sessionId: string; +} export interface VerifyPasswordInput { clientMutationId?: string; password: string; @@ -16316,6 +17294,11 @@ export interface ConstructBlueprintInput { blueprintId?: string; schemaId?: string; } +export interface ProvisionNewUserInput { + clientMutationId?: string; + email?: string; + password?: string; +} export interface ResetPasswordInput { clientMutationId?: string; roleId?: string; @@ -16336,6 +17319,23 @@ export interface CopyTemplateToBlueprintInput { nameOverride?: string; displayNameOverride?: string; } +export interface CreateApiKeyInput { + clientMutationId?: string; + keyName: string; + accessLevel?: string; + mfaLevel?: string; +} +export interface ProvisionSpatialRelationInput { + clientMutationId?: string; + pDatabaseId?: string; + pSourceTableId?: string; + pSourceFieldId?: string; + pTargetTableId?: string; + pTargetFieldId?: string; + pName?: string; + pOperator?: string; + pParamName?: string; +} export interface BootstrapUserInput { clientMutationId?: string; targetDatabaseId?: string; @@ -16452,7 +17452,7 @@ export interface ApplyRlsInput { permissive?: boolean; name?: string; } -export interface SignInOneTimeTokenInput { +export interface SignInCrossOriginInput { clientMutationId?: string; token?: string; credentialKind?: string; @@ -16471,7 +17471,7 @@ export interface ExtendTokenExpiresInput { clientMutationId?: string; amount?: IntervalInput; } -export interface SignInInput { +export interface SignUpInput { clientMutationId?: string; email?: string; password?: string; @@ -16479,20 +17479,21 @@ export interface SignInInput { credentialKind?: string; csrfToken?: string; } -export interface SignUpInput { +export interface RequestCrossOriginTokenInput { clientMutationId?: string; email?: string; password?: string; + origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; - credentialKind?: string; - csrfToken?: string; } -export interface OneTimeTokenInput { +export interface SignInInput { clientMutationId?: string; email?: string; password?: string; - origin?: ConstructiveInternalTypeOrigin; rememberMe?: boolean; + credentialKind?: string; + csrfToken?: string; + deviceToken?: string; } export interface ProvisionTableInput { clientMutationId?: string; @@ -16718,6 +17719,15 @@ export interface DatabaseToManyEmbeddingChunkFilter { /** Filters to entities where no related entity matches. */ none?: EmbeddingChunkFilter; } +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManySpatialRelationFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SpatialRelationFilter; + /** Filters to entities where every related entity matches. */ + every?: SpatialRelationFilter; + /** Filters to entities where no related entity matches. */ + none?: SpatialRelationFilter; +} /** A filter to be used against many `DatabaseTransfer` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManyDatabaseTransferFilter { /** Filters to entities where at least one related entity matches. */ @@ -16979,15 +17989,6 @@ export interface DatabaseToManyUsersModuleFilter { /** Filters to entities where no related entity matches. */ none?: UsersModuleFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface DatabaseToManyTableTemplateModuleFilter { - /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; - /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; - /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; -} /** A filter to be used against many `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManySecureTableProvisionFilter { /** Filters to entities where at least one related entity matches. */ @@ -17033,6 +18034,33 @@ export interface DatabaseToManyStorageModuleFilter { /** Filters to entities where no related entity matches. */ none?: StorageModuleFilter; } +/** A filter to be used against many `EntityTypeProvision` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManyEntityTypeProvisionFilter { + /** Filters to entities where at least one related entity matches. */ + some?: EntityTypeProvisionFilter; + /** Filters to entities where every related entity matches. */ + every?: EntityTypeProvisionFilter; + /** Filters to entities where no related entity matches. */ + none?: EntityTypeProvisionFilter; +} +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManySessionSecretsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SessionSecretsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: SessionSecretsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: SessionSecretsModuleFilter; +} +/** A filter to be used against many `WebauthnCredentialsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DatabaseToManyWebauthnCredentialsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: WebauthnCredentialsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: WebauthnCredentialsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: WebauthnCredentialsModuleFilter; +} /** A filter to be used against many `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseToManyDatabaseProvisionModuleFilter { /** Filters to entities where at least one related entity matches. */ @@ -17121,14 +18149,14 @@ export interface SchemaToManyApiSchemaFilter { /** Filters to entities where no related entity matches. */ none?: ApiSchemaFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface SchemaToManyTableTemplateModuleFilter { +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SchemaToManySessionSecretsModuleFilter { /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; + some?: SessionSecretsModuleFilter; /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; + every?: SessionSecretsModuleFilter; /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; + none?: SessionSecretsModuleFilter; } /** A filter to be used against many `CheckConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface TableToManyCheckConstraintFilter { @@ -17247,14 +18275,14 @@ export interface TableToManyEmbeddingChunkFilter { /** Filters to entities where no related entity matches. */ none?: EmbeddingChunkFilter; } -/** A filter to be used against many `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface TableToManyTableTemplateModuleFilter { +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface TableToManySpatialRelationFilter { /** Filters to entities where at least one related entity matches. */ - some?: TableTemplateModuleFilter; + some?: SpatialRelationFilter; /** Filters to entities where every related entity matches. */ - every?: TableTemplateModuleFilter; + every?: SpatialRelationFilter; /** Filters to entities where no related entity matches. */ - none?: TableTemplateModuleFilter; + none?: SpatialRelationFilter; } /** A filter to be used against many `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface TableToManySecureTableProvisionFilter { @@ -17274,6 +18302,24 @@ export interface TableToManyRelationProvisionFilter { /** Filters to entities where no related entity matches. */ none?: RelationProvisionFilter; } +/** A filter to be used against many `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface TableToManySessionSecretsModuleFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SessionSecretsModuleFilter; + /** Filters to entities where every related entity matches. */ + every?: SessionSecretsModuleFilter; + /** Filters to entities where no related entity matches. */ + none?: SessionSecretsModuleFilter; +} +/** A filter to be used against many `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface FieldToManySpatialRelationFilter { + /** Filters to entities where at least one related entity matches. */ + some?: SpatialRelationFilter; + /** Filters to entities where every related entity matches. */ + every?: SpatialRelationFilter; + /** Filters to entities where no related entity matches. */ + none?: SpatialRelationFilter; +} /** A filter to be used against many `ViewTable` object types. All fields are combined with a logical ‘and.’ */ export interface ViewToManyViewTableFilter { /** Filters to entities where at least one related entity matches. */ @@ -18063,6 +19109,15 @@ export interface UserToManyOrgOwnerGrantFilter { /** Filters to entities where no related entity matches. */ none?: OrgOwnerGrantFilter; } +/** A filter to be used against many `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface UserToManyOrgMemberProfileFilter { + /** Filters to entities where at least one related entity matches. */ + some?: OrgMemberProfileFilter; + /** Filters to entities where every related entity matches. */ + every?: OrgMemberProfileFilter; + /** Filters to entities where no related entity matches. */ + none?: OrgMemberProfileFilter; +} /** A filter to be used against many `OrgGrant` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyOrgGrantFilter { /** Filters to entities where at least one related entity matches. */ @@ -18171,15 +19226,6 @@ export interface UserToManyCryptoAddressFilter { /** Filters to entities where no related entity matches. */ none?: CryptoAddressFilter; } -/** A filter to be used against many `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface UserToManyConnectedAccountFilter { - /** Filters to entities where at least one related entity matches. */ - some?: ConnectedAccountFilter; - /** Filters to entities where every related entity matches. */ - every?: ConnectedAccountFilter; - /** Filters to entities where no related entity matches. */ - none?: ConnectedAccountFilter; -} /** A filter to be used against many `AppInvite` object types. All fields are combined with a logical ‘and.’ */ export interface UserToManyAppInviteFilter { /** Filters to entities where at least one related entity matches. */ @@ -18313,14 +19359,10 @@ export interface SchemaFilter { apiSchemas?: SchemaToManyApiSchemaFilter; /** `apiSchemas` exist. */ apiSchemasExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByPrivateSchemaId` relation. */ - tableTemplateModulesByPrivateSchemaId?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByPrivateSchemaId` exist. */ - tableTemplateModulesByPrivateSchemaIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: SchemaToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: SchemaToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } /** A filter to be used against `Table` object types. All fields are combined with a logical ‘and.’ */ export interface TableFilter { @@ -18432,14 +19474,14 @@ export interface TableFilter { embeddingChunks?: TableToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; - /** Filter by the object’s `tableTemplateModulesByOwnerTableId` relation. */ - tableTemplateModulesByOwnerTableId?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModulesByOwnerTableId` exist. */ - tableTemplateModulesByOwnerTableIdExist?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: TableToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefTableId` relation. */ + spatialRelationsByRefTableId?: TableToManySpatialRelationFilter; + /** `spatialRelationsByRefTableId` exist. */ + spatialRelationsByRefTableIdExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: TableToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: TableToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -18452,6 +19494,14 @@ export interface TableFilter { relationProvisionsByTargetTableId?: TableToManyRelationProvisionFilter; /** `relationProvisionsByTargetTableId` exist. */ relationProvisionsByTargetTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModulesBySessionsTableId` relation. */ + sessionSecretsModulesBySessionsTableId?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModulesBySessionsTableId` exist. */ + sessionSecretsModulesBySessionsTableIdExist?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: TableToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; } /** A filter to be used against `CheckConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface CheckConstraintFilter { @@ -18554,6 +19604,14 @@ export interface FieldFilter { database?: DatabaseFilter; /** Filter by the object’s `table` relation. */ table?: TableFilter; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: FieldToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; + /** Filter by the object’s `spatialRelationsByRefFieldId` relation. */ + spatialRelationsByRefFieldId?: FieldToManySpatialRelationFilter; + /** `spatialRelationsByRefFieldId` exist. */ + spatialRelationsByRefFieldIdExist?: boolean; } /** A filter to be used against `ForeignKeyConstraint` object types. All fields are combined with a logical ‘and.’ */ export interface ForeignKeyConstraintFilter { @@ -19151,23 +20209,72 @@ export interface EmbeddingChunkFilter { /** Checks for all expressions in this list. */ and?: EmbeddingChunkFilter[]; /** Checks for any expressions in this list. */ - or?: EmbeddingChunkFilter[]; + or?: EmbeddingChunkFilter[]; + /** Negates the expression. */ + not?: EmbeddingChunkFilter; + /** Filter by the object’s `chunksTable` relation. */ + chunksTable?: TableFilter; + /** A related `chunksTable` exists. */ + chunksTableExists?: boolean; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `embeddingField` relation. */ + embeddingField?: FieldFilter; + /** A related `embeddingField` exists. */ + embeddingFieldExists?: boolean; + /** Filter by the object’s `parentFkField` relation. */ + parentFkField?: FieldFilter; + /** A related `parentFkField` exists. */ + parentFkFieldExists?: boolean; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} +/** A filter to be used against `SpatialRelation` object types. All fields are combined with a logical ‘and.’ */ +export interface SpatialRelationFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `fieldId` field. */ + fieldId?: UUIDFilter; + /** Filter by the object’s `refTableId` field. */ + refTableId?: UUIDFilter; + /** Filter by the object’s `refFieldId` field. */ + refFieldId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `operator` field. */ + operator?: StringFilter; + /** Filter by the object’s `paramName` field. */ + paramName?: StringFilter; + /** Filter by the object’s `category` field. */ + category?: ObjectCategoryFilter; + /** Filter by the object’s `module` field. */ + module?: StringFilter; + /** Filter by the object’s `scope` field. */ + scope?: IntFilter; + /** Filter by the object’s `tags` field. */ + tags?: StringListFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Checks for all expressions in this list. */ + and?: SpatialRelationFilter[]; + /** Checks for any expressions in this list. */ + or?: SpatialRelationFilter[]; /** Negates the expression. */ - not?: EmbeddingChunkFilter; - /** Filter by the object’s `chunksTable` relation. */ - chunksTable?: TableFilter; - /** A related `chunksTable` exists. */ - chunksTableExists?: boolean; + not?: SpatialRelationFilter; /** Filter by the object’s `database` relation. */ database?: DatabaseFilter; - /** Filter by the object’s `embeddingField` relation. */ - embeddingField?: FieldFilter; - /** A related `embeddingField` exists. */ - embeddingFieldExists?: boolean; - /** Filter by the object’s `parentFkField` relation. */ - parentFkField?: FieldFilter; - /** A related `parentFkField` exists. */ - parentFkFieldExists?: boolean; + /** Filter by the object’s `field` relation. */ + field?: FieldFilter; + /** Filter by the object’s `refField` relation. */ + refField?: FieldFilter; + /** Filter by the object’s `refTable` relation. */ + refTable?: TableFilter; /** Filter by the object’s `table` relation. */ table?: TableFilter; } @@ -19988,6 +21095,8 @@ export interface MembershipsModuleFilter { entityIdsByPerm?: StringFilter; /** Filter by the object’s `entityIdsFunction` field. */ entityIdsFunction?: StringFilter; + /** Filter by the object’s `memberProfilesTableId` field. */ + memberProfilesTableId?: UUIDFilter; /** Checks for all expressions in this list. */ and?: MembershipsModuleFilter[]; /** Checks for any expressions in this list. */ @@ -20306,10 +21415,10 @@ export interface UserAuthModuleFilter { sendAccountDeletionEmailFunction?: StringFilter; /** Filter by the object’s `deleteAccountFunction` field. */ deleteAccountFunction?: StringFilter; - /** Filter by the object’s `signInOneTimeTokenFunction` field. */ - signInOneTimeTokenFunction?: StringFilter; - /** Filter by the object’s `oneTimeTokenFunction` field. */ - oneTimeTokenFunction?: StringFilter; + /** Filter by the object’s `signInCrossOriginFunction` field. */ + signInCrossOriginFunction?: StringFilter; + /** Filter by the object’s `requestCrossOriginTokenFunction` field. */ + requestCrossOriginTokenFunction?: StringFilter; /** Filter by the object’s `extendTokenExpires` field. */ extendTokenExpires?: StringFilter; /** Checks for all expressions in this list. */ @@ -20366,43 +21475,6 @@ export interface UsersModuleFilter { /** Filter by the object’s `typeTable` relation. */ typeTable?: TableFilter; } -/** A filter to be used against `TableTemplateModule` object types. All fields are combined with a logical ‘and.’ */ -export interface TableTemplateModuleFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `databaseId` field. */ - databaseId?: UUIDFilter; - /** Filter by the object’s `schemaId` field. */ - schemaId?: UUIDFilter; - /** Filter by the object’s `privateSchemaId` field. */ - privateSchemaId?: UUIDFilter; - /** Filter by the object’s `tableId` field. */ - tableId?: UUIDFilter; - /** Filter by the object’s `ownerTableId` field. */ - ownerTableId?: UUIDFilter; - /** Filter by the object’s `tableName` field. */ - tableName?: StringFilter; - /** Filter by the object’s `nodeType` field. */ - nodeType?: StringFilter; - /** Filter by the object’s `data` field. */ - data?: JSONFilter; - /** Checks for all expressions in this list. */ - and?: TableTemplateModuleFilter[]; - /** Checks for any expressions in this list. */ - or?: TableTemplateModuleFilter[]; - /** Negates the expression. */ - not?: TableTemplateModuleFilter; - /** Filter by the object’s `database` relation. */ - database?: DatabaseFilter; - /** Filter by the object’s `ownerTable` relation. */ - ownerTable?: TableFilter; - /** Filter by the object’s `privateSchema` relation. */ - privateSchema?: SchemaFilter; - /** Filter by the object’s `schema` relation. */ - schema?: SchemaFilter; - /** Filter by the object’s `table` relation. */ - table?: TableFilter; -} /** A filter to be used against `SecureTableProvision` object types. All fields are combined with a logical ‘and.’ */ export interface SecureTableProvisionFilter { /** Filter by the object’s `id` field. */ @@ -20670,6 +21742,113 @@ export interface StorageModuleFilter { /** Filter by the object’s `uploadRequestsTable` relation. */ uploadRequestsTable?: TableFilter; } +/** A filter to be used against `EntityTypeProvision` object types. All fields are combined with a logical ‘and.’ */ +export interface EntityTypeProvisionFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `name` field. */ + name?: StringFilter; + /** Filter by the object’s `prefix` field. */ + prefix?: StringFilter; + /** Filter by the object’s `description` field. */ + description?: StringFilter; + /** Filter by the object’s `parentEntity` field. */ + parentEntity?: StringFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `isVisible` field. */ + isVisible?: BooleanFilter; + /** Filter by the object’s `hasLimits` field. */ + hasLimits?: BooleanFilter; + /** Filter by the object’s `hasProfiles` field. */ + hasProfiles?: BooleanFilter; + /** Filter by the object’s `hasLevels` field. */ + hasLevels?: BooleanFilter; + /** Filter by the object’s `skipEntityPolicies` field. */ + skipEntityPolicies?: BooleanFilter; + /** Filter by the object’s `tableProvision` field. */ + tableProvision?: JSONFilter; + /** Filter by the object’s `outMembershipType` field. */ + outMembershipType?: IntFilter; + /** Filter by the object’s `outEntityTableId` field. */ + outEntityTableId?: UUIDFilter; + /** Filter by the object’s `outEntityTableName` field. */ + outEntityTableName?: StringFilter; + /** Filter by the object’s `outInstalledModules` field. */ + outInstalledModules?: StringListFilter; + /** Checks for all expressions in this list. */ + and?: EntityTypeProvisionFilter[]; + /** Checks for any expressions in this list. */ + or?: EntityTypeProvisionFilter[]; + /** Negates the expression. */ + not?: EntityTypeProvisionFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; +} +/** A filter to be used against `SessionSecretsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface SessionSecretsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Filter by the object’s `sessionsTableId` field. */ + sessionsTableId?: UUIDFilter; + /** Checks for all expressions in this list. */ + and?: SessionSecretsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: SessionSecretsModuleFilter[]; + /** Negates the expression. */ + not?: SessionSecretsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `sessionsTable` relation. */ + sessionsTable?: TableFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} +/** A filter to be used against `WebauthnCredentialsModule` object types. All fields are combined with a logical ‘and.’ */ +export interface WebauthnCredentialsModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `privateSchemaId` field. */ + privateSchemaId?: UUIDFilter; + /** Filter by the object’s `tableId` field. */ + tableId?: UUIDFilter; + /** Filter by the object’s `ownerTableId` field. */ + ownerTableId?: UUIDFilter; + /** Filter by the object’s `tableName` field. */ + tableName?: StringFilter; + /** Checks for all expressions in this list. */ + and?: WebauthnCredentialsModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: WebauthnCredentialsModuleFilter[]; + /** Negates the expression. */ + not?: WebauthnCredentialsModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `ownerTable` relation. */ + ownerTable?: TableFilter; + /** Filter by the object’s `privateSchema` relation. */ + privateSchema?: SchemaFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `table` relation. */ + table?: TableFilter; +} /** A filter to be used against `DatabaseProvisionModule` object types. All fields are combined with a logical ‘and.’ */ export interface DatabaseProvisionModuleFilter { /** Filter by the object’s `id` field. */ @@ -20901,6 +22080,10 @@ export interface DatabaseFilter { embeddingChunks?: DatabaseToManyEmbeddingChunkFilter; /** `embeddingChunks` exist. */ embeddingChunksExist?: boolean; + /** Filter by the object’s `spatialRelations` relation. */ + spatialRelations?: DatabaseToManySpatialRelationFilter; + /** `spatialRelations` exist. */ + spatialRelationsExist?: boolean; /** Filter by the object’s `databaseTransfers` relation. */ databaseTransfers?: DatabaseToManyDatabaseTransferFilter; /** `databaseTransfers` exist. */ @@ -21025,10 +22208,6 @@ export interface DatabaseFilter { hierarchyModule?: HierarchyModuleFilter; /** A related `hierarchyModule` exists. */ hierarchyModuleExists?: boolean; - /** Filter by the object’s `tableTemplateModules` relation. */ - tableTemplateModules?: DatabaseToManyTableTemplateModuleFilter; - /** `tableTemplateModules` exist. */ - tableTemplateModulesExist?: boolean; /** Filter by the object’s `secureTableProvisions` relation. */ secureTableProvisions?: DatabaseToManySecureTableProvisionFilter; /** `secureTableProvisions` exist. */ @@ -21049,10 +22228,26 @@ export interface DatabaseFilter { storageModules?: DatabaseToManyStorageModuleFilter; /** `storageModules` exist. */ storageModulesExist?: boolean; + /** Filter by the object’s `entityTypeProvisions` relation. */ + entityTypeProvisions?: DatabaseToManyEntityTypeProvisionFilter; + /** `entityTypeProvisions` exist. */ + entityTypeProvisionsExist?: boolean; /** Filter by the object’s `rateLimitsModule` relation. */ rateLimitsModule?: RateLimitsModuleFilter; /** A related `rateLimitsModule` exists. */ rateLimitsModuleExists?: boolean; + /** Filter by the object’s `devicesModule` relation. */ + devicesModule?: DevicesModuleFilter; + /** A related `devicesModule` exists. */ + devicesModuleExists?: boolean; + /** Filter by the object’s `sessionSecretsModules` relation. */ + sessionSecretsModules?: DatabaseToManySessionSecretsModuleFilter; + /** `sessionSecretsModules` exist. */ + sessionSecretsModulesExist?: boolean; + /** Filter by the object’s `webauthnCredentialsModules` relation. */ + webauthnCredentialsModules?: DatabaseToManyWebauthnCredentialsModuleFilter; + /** `webauthnCredentialsModules` exist. */ + webauthnCredentialsModulesExist?: boolean; /** Filter by the object’s `databaseProvisionModules` relation. */ databaseProvisionModules?: DatabaseToManyDatabaseProvisionModuleFilter; /** `databaseProvisionModules` exist. */ @@ -21161,6 +22356,8 @@ export interface OrgMembershipFilter { isDisabled?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -21173,6 +22370,8 @@ export interface OrgMembershipFilter { actorId?: UUIDFilter; /** Filter by the object’s `entityId` field. */ entityId?: UUIDFilter; + /** Filter by the object’s `isReadOnly` field. */ + isReadOnly?: BooleanFilter; /** Filter by the object’s `profileId` field. */ profileId?: UUIDFilter; /** Checks for all expressions in this list. */ @@ -21185,6 +22384,10 @@ export interface OrgMembershipFilter { actor?: UserFilter; /** Filter by the object’s `entity` relation. */ entity?: UserFilter; + /** Filter by the object’s `orgMemberProfileByMembershipId` relation. */ + orgMemberProfileByMembershipId?: OrgMemberProfileFilter; + /** A related `orgMemberProfileByMembershipId` exists. */ + orgMemberProfileByMembershipIdExists?: boolean; } /** A filter to be used against `OrgMember` object types. All fields are combined with a logical ‘and.’ */ export interface OrgMemberFilter { @@ -21269,6 +22472,43 @@ export interface OrgOwnerGrantFilter { /** A related `grantor` exists. */ grantorExists?: boolean; } +/** A filter to be used against `OrgMemberProfile` object types. All fields are combined with a logical ‘and.’ */ +export interface OrgMemberProfileFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `createdAt` field. */ + createdAt?: DatetimeFilter; + /** Filter by the object’s `updatedAt` field. */ + updatedAt?: DatetimeFilter; + /** Filter by the object’s `membershipId` field. */ + membershipId?: UUIDFilter; + /** Filter by the object’s `entityId` field. */ + entityId?: UUIDFilter; + /** Filter by the object’s `actorId` field. */ + actorId?: UUIDFilter; + /** Filter by the object’s `displayName` field. */ + displayName?: StringFilter; + /** Filter by the object’s `email` field. */ + email?: StringFilter; + /** Filter by the object’s `title` field. */ + title?: StringFilter; + /** Filter by the object’s `bio` field. */ + bio?: StringFilter; + /** Filter by the object’s `profilePicture` field. */ + profilePicture?: ConstructiveInternalTypeImageFilter; + /** Checks for all expressions in this list. */ + and?: OrgMemberProfileFilter[]; + /** Checks for any expressions in this list. */ + or?: OrgMemberProfileFilter[]; + /** Negates the expression. */ + not?: OrgMemberProfileFilter; + /** Filter by the object’s `actor` relation. */ + actor?: UserFilter; + /** Filter by the object’s `entity` relation. */ + entity?: UserFilter; + /** Filter by the object’s `membership` relation. */ + membership?: OrgMembershipFilter; +} /** A filter to be used against `OrgGrant` object types. All fields are combined with a logical ‘and.’ */ export interface OrgGrantFilter { /** Filter by the object’s `id` field. */ @@ -21587,33 +22827,6 @@ export interface CryptoAddressFilter { /** Filter by the object’s `owner` relation. */ owner?: UserFilter; } -/** A filter to be used against `ConnectedAccount` object types. All fields are combined with a logical ‘and.’ */ -export interface ConnectedAccountFilter { - /** Filter by the object’s `id` field. */ - id?: UUIDFilter; - /** Filter by the object’s `ownerId` field. */ - ownerId?: UUIDFilter; - /** Filter by the object’s `service` field. */ - service?: StringFilter; - /** Filter by the object’s `identifier` field. */ - identifier?: StringFilter; - /** Filter by the object’s `details` field. */ - details?: JSONFilter; - /** Filter by the object’s `isVerified` field. */ - isVerified?: BooleanFilter; - /** Filter by the object’s `createdAt` field. */ - createdAt?: DatetimeFilter; - /** Filter by the object’s `updatedAt` field. */ - updatedAt?: DatetimeFilter; - /** Checks for all expressions in this list. */ - and?: ConnectedAccountFilter[]; - /** Checks for any expressions in this list. */ - or?: ConnectedAccountFilter[]; - /** Negates the expression. */ - not?: ConnectedAccountFilter; - /** Filter by the object’s `owner` relation. */ - owner?: UserFilter; -} /** A filter to be used against `AppInvite` object types. All fields are combined with a logical ‘and.’ */ export interface AppInviteFilter { /** Filter by the object’s `id` field. */ @@ -22219,6 +23432,14 @@ export interface UserFilter { orgOwnerGrantsByGrantorId?: UserToManyOrgOwnerGrantFilter; /** `orgOwnerGrantsByGrantorId` exist. */ orgOwnerGrantsByGrantorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByActorId` relation. */ + orgMemberProfilesByActorId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByActorId` exist. */ + orgMemberProfilesByActorIdExist?: boolean; + /** Filter by the object’s `orgMemberProfilesByEntityId` relation. */ + orgMemberProfilesByEntityId?: UserToManyOrgMemberProfileFilter; + /** `orgMemberProfilesByEntityId` exist. */ + orgMemberProfilesByEntityIdExist?: boolean; /** Filter by the object’s `orgGrantsByActorId` relation. */ orgGrantsByActorId?: UserToManyOrgGrantFilter; /** `orgGrantsByActorId` exist. */ @@ -22299,10 +23520,6 @@ export interface UserFilter { ownedCryptoAddresses?: UserToManyCryptoAddressFilter; /** `ownedCryptoAddresses` exist. */ ownedCryptoAddressesExist?: boolean; - /** Filter by the object’s `ownedConnectedAccounts` relation. */ - ownedConnectedAccounts?: UserToManyConnectedAccountFilter; - /** `ownedConnectedAccounts` exist. */ - ownedConnectedAccountsExist?: boolean; /** Filter by the object’s `appInvitesBySenderId` relation. */ appInvitesBySenderId?: UserToManyAppInviteFilter; /** `appInvitesBySenderId` exist. */ @@ -22500,6 +23717,37 @@ export interface RateLimitsModuleFilter { /** Filter by the object’s `schema` relation. */ schema?: SchemaFilter; } +/** A filter to be used against `DevicesModule` object types. All fields are combined with a logical ‘and.’ */ +export interface DevicesModuleFilter { + /** Filter by the object’s `id` field. */ + id?: UUIDFilter; + /** Filter by the object’s `databaseId` field. */ + databaseId?: UUIDFilter; + /** Filter by the object’s `schemaId` field. */ + schemaId?: UUIDFilter; + /** Filter by the object’s `userDevicesTableId` field. */ + userDevicesTableId?: UUIDFilter; + /** Filter by the object’s `deviceSettingsTableId` field. */ + deviceSettingsTableId?: UUIDFilter; + /** Filter by the object’s `userDevicesTable` field. */ + userDevicesTable?: StringFilter; + /** Filter by the object’s `deviceSettingsTable` field. */ + deviceSettingsTable?: StringFilter; + /** Checks for all expressions in this list. */ + and?: DevicesModuleFilter[]; + /** Checks for any expressions in this list. */ + or?: DevicesModuleFilter[]; + /** Negates the expression. */ + not?: DevicesModuleFilter; + /** Filter by the object’s `database` relation. */ + database?: DatabaseFilter; + /** Filter by the object’s `deviceSettingsTableByDeviceSettingsTableId` relation. */ + deviceSettingsTableByDeviceSettingsTableId?: TableFilter; + /** Filter by the object’s `schema` relation. */ + schema?: SchemaFilter; + /** Filter by the object’s `userDevicesTableByUserDevicesTableId` relation. */ + userDevicesTableByUserDevicesTableId?: TableFilter; +} /** A filter to be used against BitString fields. All fields are combined with a logical ‘and.’ */ export interface BitStringFilter { /** Is null (if `true` is specified) or is not null (if `false` is specified). */ @@ -22614,6 +23862,8 @@ export interface AppMembershipFilter { isVerified?: BooleanFilter; /** Filter by the object’s `isActive` field. */ isActive?: BooleanFilter; + /** Filter by the object’s `isExternal` field. */ + isExternal?: BooleanFilter; /** Filter by the object’s `isOwner` field. */ isOwner?: BooleanFilter; /** Filter by the object’s `isAdmin` field. */ @@ -22779,6 +24029,30 @@ export type RejectDatabaseTransferPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface DisconnectAccountPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type DisconnectAccountPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeApiKeyPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; +export interface RevokeSessionPayload { + clientMutationId?: string | null; + result?: boolean | null; +} +export type RevokeSessionPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface VerifyPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -22861,6 +24135,14 @@ export type ConstructBlueprintPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface ProvisionNewUserPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type ProvisionNewUserPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface ResetPasswordPayload { clientMutationId?: string | null; result?: boolean | null; @@ -22885,6 +24167,24 @@ export type CopyTemplateToBlueprintPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface CreateApiKeyPayload { + clientMutationId?: string | null; + result?: CreateApiKeyRecord | null; +} +export type CreateApiKeyPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: CreateApiKeyRecordSelect; + }; +}; +export interface ProvisionSpatialRelationPayload { + clientMutationId?: string | null; + result?: string | null; +} +export type ProvisionSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + result?: boolean; +}; export interface BootstrapUserPayload { clientMutationId?: string | null; result?: BootstrapUserRecord[] | null; @@ -22989,14 +24289,14 @@ export interface ApplyRlsPayload { export type ApplyRlsPayloadSelect = { clientMutationId?: boolean; }; -export interface SignInOneTimeTokenPayload { +export interface SignInCrossOriginPayload { clientMutationId?: string | null; - result?: SignInOneTimeTokenRecord | null; + result?: SignInCrossOriginRecord | null; } -export type SignInOneTimeTokenPayloadSelect = { +export type SignInCrossOriginPayloadSelect = { clientMutationId?: boolean; result?: { - select: SignInOneTimeTokenRecordSelect; + select: SignInCrossOriginRecordSelect; }; }; export interface CreateUserDatabasePayload { @@ -23017,16 +24317,6 @@ export type ExtendTokenExpiresPayloadSelect = { select: ExtendTokenExpiresRecordSelect; }; }; -export interface SignInPayload { - clientMutationId?: string | null; - result?: SignInRecord | null; -} -export type SignInPayloadSelect = { - clientMutationId?: boolean; - result?: { - select: SignInRecordSelect; - }; -}; export interface SignUpPayload { clientMutationId?: string | null; result?: SignUpRecord | null; @@ -23037,14 +24327,24 @@ export type SignUpPayloadSelect = { select: SignUpRecordSelect; }; }; -export interface OneTimeTokenPayload { +export interface RequestCrossOriginTokenPayload { clientMutationId?: string | null; result?: string | null; } -export type OneTimeTokenPayloadSelect = { +export type RequestCrossOriginTokenPayloadSelect = { clientMutationId?: boolean; result?: boolean; }; +export interface SignInPayload { + clientMutationId?: string | null; + result?: SignInRecord | null; +} +export type SignInPayloadSelect = { + clientMutationId?: boolean; + result?: { + select: SignInRecordSelect; + }; +}; export interface ProvisionTablePayload { clientMutationId?: string | null; result?: ProvisionTableRecord[] | null; @@ -23528,6 +24828,51 @@ export type DeleteFieldPayloadSelect = { select: FieldEdgeSelect; }; }; +export interface CreateSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was created by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} +export type CreateSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + spatialRelation?: { + select: SpatialRelationSelect; + }; + spatialRelationEdge?: { + select: SpatialRelationEdgeSelect; + }; +}; +export interface UpdateSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was updated by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} +export type UpdateSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + spatialRelation?: { + select: SpatialRelationSelect; + }; + spatialRelationEdge?: { + select: SpatialRelationEdgeSelect; + }; +}; +export interface DeleteSpatialRelationPayload { + clientMutationId?: string | null; + /** The `SpatialRelation` that was deleted by this mutation. */ + spatialRelation?: SpatialRelation | null; + spatialRelationEdge?: SpatialRelationEdge | null; +} +export type DeleteSpatialRelationPayloadSelect = { + clientMutationId?: boolean; + spatialRelation?: { + select: SpatialRelationSelect; + }; + spatialRelationEdge?: { + select: SpatialRelationEdgeSelect; + }; +}; export interface CreateForeignKeyConstraintPayload { clientMutationId?: string | null; /** The `ForeignKeyConstraint` that was created by this mutation. */ @@ -24113,51 +25458,6 @@ export type DeleteEmbeddingChunkPayloadSelect = { select: EmbeddingChunkEdgeSelect; }; }; -export interface CreateTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was created by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} -export type CreateTableTemplateModulePayloadSelect = { - clientMutationId?: boolean; - tableTemplateModule?: { - select: TableTemplateModuleSelect; - }; - tableTemplateModuleEdge?: { - select: TableTemplateModuleEdgeSelect; - }; -}; -export interface UpdateTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was updated by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} -export type UpdateTableTemplateModulePayloadSelect = { - clientMutationId?: boolean; - tableTemplateModule?: { - select: TableTemplateModuleSelect; - }; - tableTemplateModuleEdge?: { - select: TableTemplateModuleEdgeSelect; - }; -}; -export interface DeleteTableTemplateModulePayload { - clientMutationId?: string | null; - /** The `TableTemplateModule` that was deleted by this mutation. */ - tableTemplateModule?: TableTemplateModule | null; - tableTemplateModuleEdge?: TableTemplateModuleEdge | null; -} -export type DeleteTableTemplateModulePayloadSelect = { - clientMutationId?: boolean; - tableTemplateModule?: { - select: TableTemplateModuleSelect; - }; - tableTemplateModuleEdge?: { - select: TableTemplateModuleEdgeSelect; - }; -}; export interface CreateSecureTableProvisionPayload { clientMutationId?: string | null; /** The `SecureTableProvision` that was created by this mutation. */ @@ -24248,6 +25548,51 @@ export type DeleteRelationProvisionPayloadSelect = { select: RelationProvisionEdgeSelect; }; }; +export interface CreateSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was created by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} +export type CreateSessionSecretsModulePayloadSelect = { + clientMutationId?: boolean; + sessionSecretsModule?: { + select: SessionSecretsModuleSelect; + }; + sessionSecretsModuleEdge?: { + select: SessionSecretsModuleEdgeSelect; + }; +}; +export interface UpdateSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was updated by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} +export type UpdateSessionSecretsModulePayloadSelect = { + clientMutationId?: boolean; + sessionSecretsModule?: { + select: SessionSecretsModuleSelect; + }; + sessionSecretsModuleEdge?: { + select: SessionSecretsModuleEdgeSelect; + }; +}; +export interface DeleteSessionSecretsModulePayload { + clientMutationId?: string | null; + /** The `SessionSecretsModule` that was deleted by this mutation. */ + sessionSecretsModule?: SessionSecretsModule | null; + sessionSecretsModuleEdge?: SessionSecretsModuleEdge | null; +} +export type DeleteSessionSecretsModulePayloadSelect = { + clientMutationId?: boolean; + sessionSecretsModule?: { + select: SessionSecretsModuleSelect; + }; + sessionSecretsModuleEdge?: { + select: SessionSecretsModuleEdgeSelect; + }; +}; export interface CreateSchemaGrantPayload { clientMutationId?: string | null; /** The `SchemaGrant` that was created by this mutation. */ @@ -25913,6 +27258,96 @@ export type DeleteStorageModulePayloadSelect = { select: StorageModuleEdgeSelect; }; }; +export interface CreateEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was created by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} +export type CreateEntityTypeProvisionPayloadSelect = { + clientMutationId?: boolean; + entityTypeProvision?: { + select: EntityTypeProvisionSelect; + }; + entityTypeProvisionEdge?: { + select: EntityTypeProvisionEdgeSelect; + }; +}; +export interface UpdateEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was updated by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} +export type UpdateEntityTypeProvisionPayloadSelect = { + clientMutationId?: boolean; + entityTypeProvision?: { + select: EntityTypeProvisionSelect; + }; + entityTypeProvisionEdge?: { + select: EntityTypeProvisionEdgeSelect; + }; +}; +export interface DeleteEntityTypeProvisionPayload { + clientMutationId?: string | null; + /** The `EntityTypeProvision` that was deleted by this mutation. */ + entityTypeProvision?: EntityTypeProvision | null; + entityTypeProvisionEdge?: EntityTypeProvisionEdge | null; +} +export type DeleteEntityTypeProvisionPayloadSelect = { + clientMutationId?: boolean; + entityTypeProvision?: { + select: EntityTypeProvisionSelect; + }; + entityTypeProvisionEdge?: { + select: EntityTypeProvisionEdgeSelect; + }; +}; +export interface CreateWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was created by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} +export type CreateWebauthnCredentialsModulePayloadSelect = { + clientMutationId?: boolean; + webauthnCredentialsModule?: { + select: WebauthnCredentialsModuleSelect; + }; + webauthnCredentialsModuleEdge?: { + select: WebauthnCredentialsModuleEdgeSelect; + }; +}; +export interface UpdateWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was updated by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} +export type UpdateWebauthnCredentialsModulePayloadSelect = { + clientMutationId?: boolean; + webauthnCredentialsModule?: { + select: WebauthnCredentialsModuleSelect; + }; + webauthnCredentialsModuleEdge?: { + select: WebauthnCredentialsModuleEdgeSelect; + }; +}; +export interface DeleteWebauthnCredentialsModulePayload { + clientMutationId?: string | null; + /** The `WebauthnCredentialsModule` that was deleted by this mutation. */ + webauthnCredentialsModule?: WebauthnCredentialsModule | null; + webauthnCredentialsModuleEdge?: WebauthnCredentialsModuleEdge | null; +} +export type DeleteWebauthnCredentialsModulePayloadSelect = { + clientMutationId?: boolean; + webauthnCredentialsModule?: { + select: WebauthnCredentialsModuleSelect; + }; + webauthnCredentialsModuleEdge?: { + select: WebauthnCredentialsModuleEdgeSelect; + }; +}; export interface CreateDatabaseProvisionModulePayload { clientMutationId?: string | null; /** The `DatabaseProvisionModule` that was created by this mutation. */ @@ -26273,6 +27708,51 @@ export type DeleteOrgOwnerGrantPayloadSelect = { select: OrgOwnerGrantEdgeSelect; }; }; +export interface CreateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was created by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type CreateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface UpdateOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was updated by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type UpdateOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; +export interface DeleteOrgMemberProfilePayload { + clientMutationId?: string | null; + /** The `OrgMemberProfile` that was deleted by this mutation. */ + orgMemberProfile?: OrgMemberProfile | null; + orgMemberProfileEdge?: OrgMemberProfileEdge | null; +} +export type DeleteOrgMemberProfilePayloadSelect = { + clientMutationId?: boolean; + orgMemberProfile?: { + select: OrgMemberProfileSelect; + }; + orgMemberProfileEdge?: { + select: OrgMemberProfileEdgeSelect; + }; +}; export interface CreateOrgGrantPayload { clientMutationId?: string | null; /** The `OrgGrant` that was created by this mutation. */ @@ -26813,51 +28293,6 @@ export type DeleteCryptoAddressPayloadSelect = { select: CryptoAddressEdgeSelect; }; }; -export interface CreateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was created by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type CreateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface UpdateConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was updated by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type UpdateConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; -export interface DeleteConnectedAccountPayload { - clientMutationId?: string | null; - /** The `ConnectedAccount` that was deleted by this mutation. */ - connectedAccount?: ConnectedAccount | null; - connectedAccountEdge?: ConnectedAccountEdge | null; -} -export type DeleteConnectedAccountPayloadSelect = { - clientMutationId?: boolean; - connectedAccount?: { - select: ConnectedAccountSelect; - }; - connectedAccountEdge?: { - select: ConnectedAccountEdgeSelect; - }; -}; export interface CreateAppInvitePayload { clientMutationId?: string | null; /** The `AppInvite` that was created by this mutation. */ @@ -27364,49 +28799,60 @@ export type DeleteOrgLimitDefaultPayloadSelect = { select: OrgLimitDefaultEdgeSelect; }; }; -export interface CreateMembershipTypePayload { +export interface CreateDevicesModulePayload { clientMutationId?: string | null; - /** The `MembershipType` that was created by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; + /** The `DevicesModule` that was created by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; } -export type CreateMembershipTypePayloadSelect = { +export type CreateDevicesModulePayloadSelect = { clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; + devicesModule?: { + select: DevicesModuleSelect; }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; + devicesModuleEdge?: { + select: DevicesModuleEdgeSelect; }; }; -export interface UpdateMembershipTypePayload { +export interface UpdateDevicesModulePayload { clientMutationId?: string | null; - /** The `MembershipType` that was updated by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; + /** The `DevicesModule` that was updated by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; } -export type UpdateMembershipTypePayloadSelect = { +export type UpdateDevicesModulePayloadSelect = { clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; + devicesModule?: { + select: DevicesModuleSelect; }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; + devicesModuleEdge?: { + select: DevicesModuleEdgeSelect; }; }; -export interface DeleteMembershipTypePayload { +export interface DeleteDevicesModulePayload { clientMutationId?: string | null; - /** The `MembershipType` that was deleted by this mutation. */ - membershipType?: MembershipType | null; - membershipTypeEdge?: MembershipTypeEdge | null; + /** The `DevicesModule` that was deleted by this mutation. */ + devicesModule?: DevicesModule | null; + devicesModuleEdge?: DevicesModuleEdge | null; } -export type DeleteMembershipTypePayloadSelect = { +export type DeleteDevicesModulePayloadSelect = { clientMutationId?: boolean; - membershipType?: { - select: MembershipTypeSelect; + devicesModule?: { + select: DevicesModuleSelect; }; - membershipTypeEdge?: { - select: MembershipTypeEdgeSelect; + devicesModuleEdge?: { + select: DevicesModuleEdgeSelect; + }; +}; +export interface CreateUserConnectedAccountPayload { + clientMutationId?: string | null; + /** The `UserConnectedAccount` that was created by this mutation. */ + userConnectedAccount?: UserConnectedAccount | null; +} +export type CreateUserConnectedAccountPayloadSelect = { + clientMutationId?: boolean; + userConnectedAccount?: { + select: UserConnectedAccountSelect; }; }; export interface CreateAppMembershipDefaultPayload { @@ -27544,6 +28990,51 @@ export type DeleteRateLimitsModulePayloadSelect = { select: RateLimitsModuleEdgeSelect; }; }; +export interface CreateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was created by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type CreateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface UpdateMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was updated by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type UpdateMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; +export interface DeleteMembershipTypePayload { + clientMutationId?: string | null; + /** The `MembershipType` that was deleted by this mutation. */ + membershipType?: MembershipType | null; + membershipTypeEdge?: MembershipTypeEdge | null; +} +export type DeleteMembershipTypePayloadSelect = { + clientMutationId?: boolean; + membershipType?: { + select: MembershipTypeSelect; + }; + membershipTypeEdge?: { + select: MembershipTypeEdgeSelect; + }; +}; export interface CreateOrgMembershipDefaultPayload { clientMutationId?: string | null; /** The `OrgMembershipDefault` that was created by this mutation. */ @@ -27856,6 +29347,14 @@ export type AppLevelRequirementEdgeSelect = { select: AppLevelRequirementSelect; }; }; +export interface CreateApiKeyRecord { + apiKey?: string | null; + keyId?: string | null; +} +export type CreateApiKeyRecordSelect = { + apiKey?: boolean; + keyId?: boolean; +}; export interface BootstrapUserRecord { outUserId?: string | null; outEmail?: string | null; @@ -27896,7 +29395,7 @@ export type ProvisionRelationRecordSelect = { outSourceFieldId?: boolean; outTargetFieldId?: boolean; }; -export interface SignInOneTimeTokenRecord { +export interface SignInCrossOriginRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -27904,7 +29403,7 @@ export interface SignInOneTimeTokenRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInOneTimeTokenRecordSelect = { +export type SignInCrossOriginRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -27922,7 +29421,7 @@ export type ExtendTokenExpiresRecordSelect = { sessionId?: boolean; expiresAt?: boolean; }; -export interface SignInRecord { +export interface SignUpRecord { id?: string | null; userId?: string | null; accessToken?: string | null; @@ -27930,7 +29429,7 @@ export interface SignInRecord { isVerified?: boolean | null; totpEnabled?: boolean | null; } -export type SignInRecordSelect = { +export type SignUpRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; @@ -27938,21 +29437,25 @@ export type SignInRecordSelect = { isVerified?: boolean; totpEnabled?: boolean; }; -export interface SignUpRecord { +export interface SignInRecord { id?: string | null; userId?: string | null; accessToken?: string | null; accessTokenExpiresAt?: string | null; isVerified?: boolean | null; totpEnabled?: boolean | null; + mfaRequired?: boolean | null; + mfaChallengeToken?: string | null; } -export type SignUpRecordSelect = { +export type SignInRecordSelect = { id?: boolean; userId?: boolean; accessToken?: boolean; accessTokenExpiresAt?: boolean; isVerified?: boolean; totpEnabled?: boolean; + mfaRequired?: boolean; + mfaChallengeToken?: boolean; }; export interface ProvisionTableRecord { outTableId?: string | null; @@ -28022,6 +29525,18 @@ export type FieldEdgeSelect = { select: FieldSelect; }; }; +/** A `SpatialRelation` edge in the connection. */ +export interface SpatialRelationEdge { + cursor?: string | null; + /** The `SpatialRelation` at the end of the edge. */ + node?: SpatialRelation | null; +} +export type SpatialRelationEdgeSelect = { + cursor?: boolean; + node?: { + select: SpatialRelationSelect; + }; +}; /** A `ForeignKeyConstraint` edge in the connection. */ export interface ForeignKeyConstraintEdge { cursor?: string | null; @@ -28178,18 +29693,6 @@ export type EmbeddingChunkEdgeSelect = { select: EmbeddingChunkSelect; }; }; -/** A `TableTemplateModule` edge in the connection. */ -export interface TableTemplateModuleEdge { - cursor?: string | null; - /** The `TableTemplateModule` at the end of the edge. */ - node?: TableTemplateModule | null; -} -export type TableTemplateModuleEdgeSelect = { - cursor?: boolean; - node?: { - select: TableTemplateModuleSelect; - }; -}; /** A `SecureTableProvision` edge in the connection. */ export interface SecureTableProvisionEdge { cursor?: string | null; @@ -28214,6 +29717,18 @@ export type RelationProvisionEdgeSelect = { select: RelationProvisionSelect; }; }; +/** A `SessionSecretsModule` edge in the connection. */ +export interface SessionSecretsModuleEdge { + cursor?: string | null; + /** The `SessionSecretsModule` at the end of the edge. */ + node?: SessionSecretsModule | null; +} +export type SessionSecretsModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: SessionSecretsModuleSelect; + }; +}; /** A `SchemaGrant` edge in the connection. */ export interface SchemaGrantEdge { cursor?: string | null; @@ -28658,6 +30173,30 @@ export type StorageModuleEdgeSelect = { select: StorageModuleSelect; }; }; +/** A `EntityTypeProvision` edge in the connection. */ +export interface EntityTypeProvisionEdge { + cursor?: string | null; + /** The `EntityTypeProvision` at the end of the edge. */ + node?: EntityTypeProvision | null; +} +export type EntityTypeProvisionEdgeSelect = { + cursor?: boolean; + node?: { + select: EntityTypeProvisionSelect; + }; +}; +/** A `WebauthnCredentialsModule` edge in the connection. */ +export interface WebauthnCredentialsModuleEdge { + cursor?: string | null; + /** The `WebauthnCredentialsModule` at the end of the edge. */ + node?: WebauthnCredentialsModule | null; +} +export type WebauthnCredentialsModuleEdgeSelect = { + cursor?: boolean; + node?: { + select: WebauthnCredentialsModuleSelect; + }; +}; /** A `DatabaseProvisionModule` edge in the connection. */ export interface DatabaseProvisionModuleEdge { cursor?: string | null; @@ -28754,6 +30293,18 @@ export type OrgOwnerGrantEdgeSelect = { select: OrgOwnerGrantSelect; }; }; +/** A `OrgMemberProfile` edge in the connection. */ +export interface OrgMemberProfileEdge { + cursor?: string | null; + /** The `OrgMemberProfile` at the end of the edge. */ + node?: OrgMemberProfile | null; +} +export type OrgMemberProfileEdgeSelect = { + cursor?: boolean; + node?: { + select: OrgMemberProfileSelect; + }; +}; /** A `OrgGrant` edge in the connection. */ export interface OrgGrantEdge { cursor?: string | null; @@ -28898,18 +30449,6 @@ export type CryptoAddressEdgeSelect = { select: CryptoAddressSelect; }; }; -/** A `ConnectedAccount` edge in the connection. */ -export interface ConnectedAccountEdge { - cursor?: string | null; - /** The `ConnectedAccount` at the end of the edge. */ - node?: ConnectedAccount | null; -} -export type ConnectedAccountEdgeSelect = { - cursor?: boolean; - node?: { - select: ConnectedAccountSelect; - }; -}; /** A `AppInvite` edge in the connection. */ export interface AppInviteEdge { cursor?: string | null; @@ -29042,16 +30581,16 @@ export type OrgLimitDefaultEdgeSelect = { select: OrgLimitDefaultSelect; }; }; -/** A `MembershipType` edge in the connection. */ -export interface MembershipTypeEdge { +/** A `DevicesModule` edge in the connection. */ +export interface DevicesModuleEdge { cursor?: string | null; - /** The `MembershipType` at the end of the edge. */ - node?: MembershipType | null; + /** The `DevicesModule` at the end of the edge. */ + node?: DevicesModule | null; } -export type MembershipTypeEdgeSelect = { +export type DevicesModuleEdgeSelect = { cursor?: boolean; node?: { - select: MembershipTypeSelect; + select: DevicesModuleSelect; }; }; /** A `AppMembershipDefault` edge in the connection. */ @@ -29090,6 +30629,18 @@ export type RateLimitsModuleEdgeSelect = { select: RateLimitsModuleSelect; }; }; +/** A `MembershipType` edge in the connection. */ +export interface MembershipTypeEdge { + cursor?: string | null; + /** The `MembershipType` at the end of the edge. */ + node?: MembershipType | null; +} +export type MembershipTypeEdgeSelect = { + cursor?: boolean; + node?: { + select: MembershipTypeSelect; + }; +}; /** A `OrgMembershipDefault` edge in the connection. */ export interface OrgMembershipDefaultEdge { cursor?: string | null; diff --git a/sdk/constructive-sdk/src/public/orm/models/connectedAccount.ts b/sdk/constructive-sdk/src/public/orm/models/connectedAccount.ts deleted file mode 100644 index c9def156d..000000000 --- a/sdk/constructive-sdk/src/public/orm/models/connectedAccount.ts +++ /dev/null @@ -1,237 +0,0 @@ -/** - * ConnectedAccount model for ORM client - * @generated by @constructive-io/graphql-codegen - * DO NOT EDIT - changes will be overwritten - */ -import { OrmClient } from '../client'; -import { - QueryBuilder, - buildFindManyDocument, - buildFindFirstDocument, - buildFindOneDocument, - buildCreateDocument, - buildUpdateByPkDocument, - buildDeleteByPkDocument, -} from '../query-builder'; -import type { - ConnectionResult, - FindManyArgs, - FindFirstArgs, - CreateArgs, - UpdateArgs, - DeleteArgs, - InferSelectResult, - StrictSelect, -} from '../select-types'; -import type { - ConnectedAccount, - ConnectedAccountWithRelations, - ConnectedAccountSelect, - ConnectedAccountFilter, - ConnectedAccountOrderBy, - CreateConnectedAccountInput, - UpdateConnectedAccountInput, - ConnectedAccountPatch, -} from '../input-types'; -import { connectionFieldsMap } from '../input-types'; -export class ConnectedAccountModel { - constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - connectedAccounts: ConnectionResult>; - }> { - const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', - args.select, - { - where: args?.where, - orderBy: args?.orderBy as string[] | undefined, - first: args?.first, - last: args?.last, - after: args?.after, - before: args?.before, - offset: args?.offset, - }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', - document, - variables, - }); - } - findFirst( - args: FindFirstArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - connectedAccounts: { - nodes: InferSelectResult[]; - }; - }> { - const { document, variables } = buildFindFirstDocument( - 'ConnectedAccount', - 'connectedAccounts', - args.select, - { - where: args?.where, - }, - 'ConnectedAccountFilter', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccounts', - document, - variables, - }); - } - findOne( - args: { - id: string; - select: S; - } & StrictSelect - ): QueryBuilder<{ - connectedAccount: InferSelectResult | null; - }> { - const { document, variables } = buildFindManyDocument( - 'ConnectedAccount', - 'connectedAccounts', - args.select, - { - where: { - id: { - equalTo: args.id, - }, - }, - first: 1, - }, - 'ConnectedAccountFilter', - 'ConnectedAccountOrderBy', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'query', - operationName: 'ConnectedAccount', - fieldName: 'connectedAccount', - document, - variables, - transform: (data: { - connectedAccounts?: { - nodes?: InferSelectResult[]; - }; - }) => ({ - connectedAccount: data.connectedAccounts?.nodes?.[0] ?? null, - }), - }); - } - create( - args: CreateArgs & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - createConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }> { - const { document, variables } = buildCreateDocument( - 'ConnectedAccount', - 'createConnectedAccount', - 'connectedAccount', - args.select, - args.data, - 'CreateConnectedAccountInput', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'createConnectedAccount', - document, - variables, - }); - } - update( - args: UpdateArgs< - S, - { - id: string; - }, - ConnectedAccountPatch - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - updateConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }> { - const { document, variables } = buildUpdateByPkDocument( - 'ConnectedAccount', - 'updateConnectedAccount', - 'connectedAccount', - args.select, - args.where.id, - args.data, - 'UpdateConnectedAccountInput', - 'id', - 'connectedAccountPatch', - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'updateConnectedAccount', - document, - variables, - }); - } - delete( - args: DeleteArgs< - { - id: string; - }, - S - > & { - select: S; - } & StrictSelect - ): QueryBuilder<{ - deleteConnectedAccount: { - connectedAccount: InferSelectResult; - }; - }> { - const { document, variables } = buildDeleteByPkDocument( - 'ConnectedAccount', - 'deleteConnectedAccount', - 'connectedAccount', - { - id: args.where.id, - }, - 'DeleteConnectedAccountInput', - args.select, - connectionFieldsMap - ); - return new QueryBuilder({ - client: this.client, - operation: 'mutation', - operationName: 'ConnectedAccount', - fieldName: 'deleteConnectedAccount', - document, - variables, - }); - } -} diff --git a/sdk/constructive-sdk/src/public/orm/models/devicesModule.ts b/sdk/constructive-sdk/src/public/orm/models/devicesModule.ts new file mode 100644 index 000000000..11386e4fe --- /dev/null +++ b/sdk/constructive-sdk/src/public/orm/models/devicesModule.ts @@ -0,0 +1,237 @@ +/** + * DevicesModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + DevicesModule, + DevicesModuleWithRelations, + DevicesModuleSelect, + DevicesModuleFilter, + DevicesModuleOrderBy, + CreateDevicesModuleInput, + UpdateDevicesModuleInput, + DevicesModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class DevicesModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + devicesModules: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'DevicesModule', + 'devicesModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'DevicesModuleFilter', + 'DevicesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DevicesModule', + fieldName: 'devicesModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + devicesModules: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'DevicesModule', + 'devicesModules', + args.select, + { + where: args?.where, + }, + 'DevicesModuleFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DevicesModule', + fieldName: 'devicesModules', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + devicesModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'DevicesModule', + 'devicesModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'DevicesModuleFilter', + 'DevicesModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'DevicesModule', + fieldName: 'devicesModule', + document, + variables, + transform: (data: { + devicesModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + devicesModule: data.devicesModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createDevicesModule: { + devicesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'DevicesModule', + 'createDevicesModule', + 'devicesModule', + args.select, + args.data, + 'CreateDevicesModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DevicesModule', + fieldName: 'createDevicesModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + DevicesModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateDevicesModule: { + devicesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'DevicesModule', + 'updateDevicesModule', + 'devicesModule', + args.select, + args.where.id, + args.data, + 'UpdateDevicesModuleInput', + 'id', + 'devicesModulePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DevicesModule', + fieldName: 'updateDevicesModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteDevicesModule: { + devicesModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'DevicesModule', + 'deleteDevicesModule', + 'devicesModule', + { + id: args.where.id, + }, + 'DeleteDevicesModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'DevicesModule', + fieldName: 'deleteDevicesModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/public/orm/models/tableTemplateModule.ts b/sdk/constructive-sdk/src/public/orm/models/entityTypeProvision.ts similarity index 50% rename from sdk/constructive-sdk/src/public/orm/models/tableTemplateModule.ts rename to sdk/constructive-sdk/src/public/orm/models/entityTypeProvision.ts index c08032798..00ae9ebbc 100644 --- a/sdk/constructive-sdk/src/public/orm/models/tableTemplateModule.ts +++ b/sdk/constructive-sdk/src/public/orm/models/entityTypeProvision.ts @@ -1,5 +1,5 @@ /** - * TableTemplateModule model for ORM client + * EntityTypeProvision model for ORM client * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ @@ -24,28 +24,28 @@ import type { StrictSelect, } from '../select-types'; import type { - TableTemplateModule, - TableTemplateModuleWithRelations, - TableTemplateModuleSelect, - TableTemplateModuleFilter, - TableTemplateModuleOrderBy, - CreateTableTemplateModuleInput, - UpdateTableTemplateModuleInput, - TableTemplateModulePatch, + EntityTypeProvision, + EntityTypeProvisionWithRelations, + EntityTypeProvisionSelect, + EntityTypeProvisionFilter, + EntityTypeProvisionOrderBy, + CreateEntityTypeProvisionInput, + UpdateEntityTypeProvisionInput, + EntityTypeProvisionPatch, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; -export class TableTemplateModuleModel { +export class EntityTypeProvisionModel { constructor(private client: OrmClient) {} - findMany( - args: FindManyArgs & { + findMany( + args: FindManyArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - tableTemplateModules: ConnectionResult>; + entityTypeProvisions: ConnectionResult>; }> { const { document, variables } = buildFindManyDocument( - 'TableTemplateModule', - 'tableTemplateModules', + 'EntityTypeProvision', + 'entityTypeProvisions', args.select, { where: args?.where, @@ -56,58 +56,58 @@ export class TableTemplateModuleModel { before: args?.before, offset: args?.offset, }, - 'TableTemplateModuleFilter', - 'TableTemplateModuleOrderBy', + 'EntityTypeProvisionFilter', + 'EntityTypeProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'TableTemplateModule', - fieldName: 'tableTemplateModules', + operationName: 'EntityTypeProvision', + fieldName: 'entityTypeProvisions', document, variables, }); } - findFirst( - args: FindFirstArgs & { + findFirst( + args: FindFirstArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - tableTemplateModules: { - nodes: InferSelectResult[]; + entityTypeProvisions: { + nodes: InferSelectResult[]; }; }> { const { document, variables } = buildFindFirstDocument( - 'TableTemplateModule', - 'tableTemplateModules', + 'EntityTypeProvision', + 'entityTypeProvisions', args.select, { where: args?.where, }, - 'TableTemplateModuleFilter', + 'EntityTypeProvisionFilter', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'TableTemplateModule', - fieldName: 'tableTemplateModules', + operationName: 'EntityTypeProvision', + fieldName: 'entityTypeProvisions', document, variables, }); } - findOne( + findOne( args: { id: string; select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - tableTemplateModule: InferSelectResult | null; + entityTypeProvision: InferSelectResult | null; }> { const { document, variables } = buildFindManyDocument( - 'TableTemplateModule', - 'tableTemplateModules', + 'EntityTypeProvision', + 'entityTypeProvisions', args.select, { where: { @@ -117,90 +117,90 @@ export class TableTemplateModuleModel { }, first: 1, }, - 'TableTemplateModuleFilter', - 'TableTemplateModuleOrderBy', + 'EntityTypeProvisionFilter', + 'EntityTypeProvisionOrderBy', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'query', - operationName: 'TableTemplateModule', - fieldName: 'tableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'entityTypeProvision', document, variables, transform: (data: { - tableTemplateModules?: { - nodes?: InferSelectResult[]; + entityTypeProvisions?: { + nodes?: InferSelectResult[]; }; }) => ({ - tableTemplateModule: data.tableTemplateModules?.nodes?.[0] ?? null, + entityTypeProvision: data.entityTypeProvisions?.nodes?.[0] ?? null, }), }); } - create( - args: CreateArgs & { + create( + args: CreateArgs & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - createTableTemplateModule: { - tableTemplateModule: InferSelectResult; + createEntityTypeProvision: { + entityTypeProvision: InferSelectResult; }; }> { const { document, variables } = buildCreateDocument( - 'TableTemplateModule', - 'createTableTemplateModule', - 'tableTemplateModule', + 'EntityTypeProvision', + 'createEntityTypeProvision', + 'entityTypeProvision', args.select, args.data, - 'CreateTableTemplateModuleInput', + 'CreateEntityTypeProvisionInput', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'TableTemplateModule', - fieldName: 'createTableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'createEntityTypeProvision', document, variables, }); } - update( + update( args: UpdateArgs< S, { id: string; }, - TableTemplateModulePatch + EntityTypeProvisionPatch > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - updateTableTemplateModule: { - tableTemplateModule: InferSelectResult; + updateEntityTypeProvision: { + entityTypeProvision: InferSelectResult; }; }> { const { document, variables } = buildUpdateByPkDocument( - 'TableTemplateModule', - 'updateTableTemplateModule', - 'tableTemplateModule', + 'EntityTypeProvision', + 'updateEntityTypeProvision', + 'entityTypeProvision', args.select, args.where.id, args.data, - 'UpdateTableTemplateModuleInput', + 'UpdateEntityTypeProvisionInput', 'id', - 'tableTemplateModulePatch', + 'entityTypeProvisionPatch', connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'TableTemplateModule', - fieldName: 'updateTableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'updateEntityTypeProvision', document, variables, }); } - delete( + delete( args: DeleteArgs< { id: string; @@ -208,28 +208,28 @@ export class TableTemplateModuleModel { S > & { select: S; - } & StrictSelect + } & StrictSelect ): QueryBuilder<{ - deleteTableTemplateModule: { - tableTemplateModule: InferSelectResult; + deleteEntityTypeProvision: { + entityTypeProvision: InferSelectResult; }; }> { const { document, variables } = buildDeleteByPkDocument( - 'TableTemplateModule', - 'deleteTableTemplateModule', - 'tableTemplateModule', + 'EntityTypeProvision', + 'deleteEntityTypeProvision', + 'entityTypeProvision', { id: args.where.id, }, - 'DeleteTableTemplateModuleInput', + 'DeleteEntityTypeProvisionInput', args.select, connectionFieldsMap ); return new QueryBuilder({ client: this.client, operation: 'mutation', - operationName: 'TableTemplateModule', - fieldName: 'deleteTableTemplateModule', + operationName: 'EntityTypeProvision', + fieldName: 'deleteEntityTypeProvision', document, variables, }); diff --git a/sdk/constructive-sdk/src/public/orm/models/index.ts b/sdk/constructive-sdk/src/public/orm/models/index.ts index 0eacaeee7..3a057bb2f 100644 --- a/sdk/constructive-sdk/src/public/orm/models/index.ts +++ b/sdk/constructive-sdk/src/public/orm/models/index.ts @@ -15,6 +15,7 @@ export { SchemaModel } from './schema'; export { TableModel } from './table'; export { CheckConstraintModel } from './checkConstraint'; export { FieldModel } from './field'; +export { SpatialRelationModel } from './spatialRelation'; export { ForeignKeyConstraintModel } from './foreignKeyConstraint'; export { FullTextSearchModel } from './fullTextSearch'; export { IndexModel } from './indexModel'; @@ -28,9 +29,9 @@ export { ViewTableModel } from './viewTable'; export { ViewGrantModel } from './viewGrant'; export { ViewRuleModel } from './viewRule'; export { EmbeddingChunkModel } from './embeddingChunk'; -export { TableTemplateModuleModel } from './tableTemplateModule'; export { SecureTableProvisionModel } from './secureTableProvision'; export { RelationProvisionModel } from './relationProvision'; +export { SessionSecretsModuleModel } from './sessionSecretsModule'; export { SchemaGrantModel } from './schemaGrant'; export { DefaultPrivilegeModel } from './defaultPrivilege'; export { EnumModel } from './enum'; @@ -68,6 +69,8 @@ export { BlueprintModel } from './blueprint'; export { BlueprintTemplateModel } from './blueprintTemplate'; export { BlueprintConstructionModel } from './blueprintConstruction'; export { StorageModuleModel } from './storageModule'; +export { EntityTypeProvisionModel } from './entityTypeProvision'; +export { WebauthnCredentialsModuleModel } from './webauthnCredentialsModule'; export { DatabaseProvisionModuleModel } from './databaseProvisionModule'; export { AppAdminGrantModel } from './appAdminGrant'; export { AppOwnerGrantModel } from './appOwnerGrant'; @@ -76,6 +79,7 @@ export { OrgMembershipModel } from './orgMembership'; export { OrgMemberModel } from './orgMember'; export { OrgAdminGrantModel } from './orgAdminGrant'; export { OrgOwnerGrantModel } from './orgOwnerGrant'; +export { OrgMemberProfileModel } from './orgMemberProfile'; export { OrgGrantModel } from './orgGrant'; export { OrgChartEdgeModel } from './orgChartEdge'; export { OrgChartEdgeGrantModel } from './orgChartEdgeGrant'; @@ -88,7 +92,6 @@ export { AppLevelModel } from './appLevel'; export { EmailModel } from './email'; export { PhoneNumberModel } from './phoneNumber'; export { CryptoAddressModel } from './cryptoAddress'; -export { ConnectedAccountModel } from './connectedAccount'; export { AppInviteModel } from './appInvite'; export { AppClaimedInviteModel } from './appClaimedInvite'; export { OrgInviteModel } from './orgInvite'; @@ -101,10 +104,12 @@ export { RoleTypeModel } from './roleType'; export { MigrateFileModel } from './migrateFile'; export { AppLimitDefaultModel } from './appLimitDefault'; export { OrgLimitDefaultModel } from './orgLimitDefault'; -export { MembershipTypeModel } from './membershipType'; +export { DevicesModuleModel } from './devicesModule'; +export { UserConnectedAccountModel } from './userConnectedAccount'; export { AppMembershipDefaultModel } from './appMembershipDefault'; export { CommitModel } from './commit'; export { RateLimitsModuleModel } from './rateLimitsModule'; +export { MembershipTypeModel } from './membershipType'; export { OrgMembershipDefaultModel } from './orgMembershipDefault'; export { RlsModuleModel } from './rlsModule'; export { SqlActionModel } from './sqlAction'; diff --git a/sdk/constructive-sdk/src/public/orm/models/orgMemberProfile.ts b/sdk/constructive-sdk/src/public/orm/models/orgMemberProfile.ts new file mode 100644 index 000000000..de551ba79 --- /dev/null +++ b/sdk/constructive-sdk/src/public/orm/models/orgMemberProfile.ts @@ -0,0 +1,237 @@ +/** + * OrgMemberProfile model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + OrgMemberProfile, + OrgMemberProfileWithRelations, + OrgMemberProfileSelect, + OrgMemberProfileFilter, + OrgMemberProfileOrderBy, + CreateOrgMemberProfileInput, + UpdateOrgMemberProfileInput, + OrgMemberProfilePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class OrgMemberProfileModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMemberProfiles: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgMemberProfile', + 'orgMemberProfiles', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMemberProfiles: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'OrgMemberProfile', + 'orgMemberProfiles', + args.select, + { + where: args?.where, + }, + 'OrgMemberProfileFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfiles', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + orgMemberProfile: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'OrgMemberProfile', + 'orgMemberProfiles', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'OrgMemberProfileFilter', + 'OrgMemberProfileOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'OrgMemberProfile', + fieldName: 'orgMemberProfile', + document, + variables, + transform: (data: { + orgMemberProfiles?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + orgMemberProfile: data.orgMemberProfiles?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'OrgMemberProfile', + 'createOrgMemberProfile', + 'orgMemberProfile', + args.select, + args.data, + 'CreateOrgMemberProfileInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMemberProfile', + fieldName: 'createOrgMemberProfile', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + OrgMemberProfilePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'OrgMemberProfile', + 'updateOrgMemberProfile', + 'orgMemberProfile', + args.select, + args.where.id, + args.data, + 'UpdateOrgMemberProfileInput', + 'id', + 'orgMemberProfilePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMemberProfile', + fieldName: 'updateOrgMemberProfile', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteOrgMemberProfile: { + orgMemberProfile: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'OrgMemberProfile', + 'deleteOrgMemberProfile', + 'orgMemberProfile', + { + id: args.where.id, + }, + 'DeleteOrgMemberProfileInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'OrgMemberProfile', + fieldName: 'deleteOrgMemberProfile', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/public/orm/models/sessionSecretsModule.ts b/sdk/constructive-sdk/src/public/orm/models/sessionSecretsModule.ts new file mode 100644 index 000000000..b333c87f0 --- /dev/null +++ b/sdk/constructive-sdk/src/public/orm/models/sessionSecretsModule.ts @@ -0,0 +1,239 @@ +/** + * SessionSecretsModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + SessionSecretsModule, + SessionSecretsModuleWithRelations, + SessionSecretsModuleSelect, + SessionSecretsModuleFilter, + SessionSecretsModuleOrderBy, + CreateSessionSecretsModuleInput, + UpdateSessionSecretsModuleInput, + SessionSecretsModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class SessionSecretsModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + sessionSecretsModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'SessionSecretsModule', + 'sessionSecretsModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'SessionSecretsModuleFilter', + 'SessionSecretsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SessionSecretsModule', + fieldName: 'sessionSecretsModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + sessionSecretsModules: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'SessionSecretsModule', + 'sessionSecretsModules', + args.select, + { + where: args?.where, + }, + 'SessionSecretsModuleFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SessionSecretsModule', + fieldName: 'sessionSecretsModules', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + sessionSecretsModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'SessionSecretsModule', + 'sessionSecretsModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'SessionSecretsModuleFilter', + 'SessionSecretsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SessionSecretsModule', + fieldName: 'sessionSecretsModule', + document, + variables, + transform: (data: { + sessionSecretsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + sessionSecretsModule: data.sessionSecretsModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'SessionSecretsModule', + 'createSessionSecretsModule', + 'sessionSecretsModule', + args.select, + args.data, + 'CreateSessionSecretsModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SessionSecretsModule', + fieldName: 'createSessionSecretsModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + SessionSecretsModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'SessionSecretsModule', + 'updateSessionSecretsModule', + 'sessionSecretsModule', + args.select, + args.where.id, + args.data, + 'UpdateSessionSecretsModuleInput', + 'id', + 'sessionSecretsModulePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SessionSecretsModule', + fieldName: 'updateSessionSecretsModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteSessionSecretsModule: { + sessionSecretsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'SessionSecretsModule', + 'deleteSessionSecretsModule', + 'sessionSecretsModule', + { + id: args.where.id, + }, + 'DeleteSessionSecretsModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SessionSecretsModule', + fieldName: 'deleteSessionSecretsModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/public/orm/models/spatialRelation.ts b/sdk/constructive-sdk/src/public/orm/models/spatialRelation.ts new file mode 100644 index 000000000..c1d09c31a --- /dev/null +++ b/sdk/constructive-sdk/src/public/orm/models/spatialRelation.ts @@ -0,0 +1,237 @@ +/** + * SpatialRelation model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + SpatialRelation, + SpatialRelationWithRelations, + SpatialRelationSelect, + SpatialRelationFilter, + SpatialRelationOrderBy, + CreateSpatialRelationInput, + UpdateSpatialRelationInput, + SpatialRelationPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class SpatialRelationModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + spatialRelations: ConnectionResult>; + }> { + const { document, variables } = buildFindManyDocument( + 'SpatialRelation', + 'spatialRelations', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'SpatialRelationFilter', + 'SpatialRelationOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SpatialRelation', + fieldName: 'spatialRelations', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + spatialRelations: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'SpatialRelation', + 'spatialRelations', + args.select, + { + where: args?.where, + }, + 'SpatialRelationFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SpatialRelation', + fieldName: 'spatialRelations', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + spatialRelation: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'SpatialRelation', + 'spatialRelations', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'SpatialRelationFilter', + 'SpatialRelationOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'SpatialRelation', + fieldName: 'spatialRelation', + document, + variables, + transform: (data: { + spatialRelations?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + spatialRelation: data.spatialRelations?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'SpatialRelation', + 'createSpatialRelation', + 'spatialRelation', + args.select, + args.data, + 'CreateSpatialRelationInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SpatialRelation', + fieldName: 'createSpatialRelation', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + SpatialRelationPatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'SpatialRelation', + 'updateSpatialRelation', + 'spatialRelation', + args.select, + args.where.id, + args.data, + 'UpdateSpatialRelationInput', + 'id', + 'spatialRelationPatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SpatialRelation', + fieldName: 'updateSpatialRelation', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteSpatialRelation: { + spatialRelation: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'SpatialRelation', + 'deleteSpatialRelation', + 'spatialRelation', + { + id: args.where.id, + }, + 'DeleteSpatialRelationInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'SpatialRelation', + fieldName: 'deleteSpatialRelation', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/public/orm/models/userConnectedAccount.ts b/sdk/constructive-sdk/src/public/orm/models/userConnectedAccount.ts new file mode 100644 index 000000000..45bbea7f4 --- /dev/null +++ b/sdk/constructive-sdk/src/public/orm/models/userConnectedAccount.ts @@ -0,0 +1,169 @@ +/** + * UserConnectedAccount model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + UserConnectedAccount, + UserConnectedAccountWithRelations, + UserConnectedAccountSelect, + UserConnectedAccountFilter, + UserConnectedAccountOrderBy, + CreateUserConnectedAccountInput, + UpdateUserConnectedAccountInput, + UserConnectedAccountPatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class UserConnectedAccountModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccounts: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: args?.where, + }, + 'UserConnectedAccountFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccounts', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + userConnectedAccount: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'UserConnectedAccount', + 'userConnectedAccounts', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'UserConnectedAccountFilter', + 'UserConnectedAccountOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'UserConnectedAccount', + fieldName: 'userConnectedAccount', + document, + variables, + transform: (data: { + userConnectedAccounts?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + userConnectedAccount: data.userConnectedAccounts?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createUserConnectedAccount: { + userConnectedAccount: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'UserConnectedAccount', + 'createUserConnectedAccount', + 'userConnectedAccount', + args.select, + args.data, + 'CreateUserConnectedAccountInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'UserConnectedAccount', + fieldName: 'createUserConnectedAccount', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/public/orm/models/webauthnCredentialsModule.ts b/sdk/constructive-sdk/src/public/orm/models/webauthnCredentialsModule.ts new file mode 100644 index 000000000..78e687c34 --- /dev/null +++ b/sdk/constructive-sdk/src/public/orm/models/webauthnCredentialsModule.ts @@ -0,0 +1,239 @@ +/** + * WebauthnCredentialsModule model for ORM client + * @generated by @constructive-io/graphql-codegen + * DO NOT EDIT - changes will be overwritten + */ +import { OrmClient } from '../client'; +import { + QueryBuilder, + buildFindManyDocument, + buildFindFirstDocument, + buildFindOneDocument, + buildCreateDocument, + buildUpdateByPkDocument, + buildDeleteByPkDocument, +} from '../query-builder'; +import type { + ConnectionResult, + FindManyArgs, + FindFirstArgs, + CreateArgs, + UpdateArgs, + DeleteArgs, + InferSelectResult, + StrictSelect, +} from '../select-types'; +import type { + WebauthnCredentialsModule, + WebauthnCredentialsModuleWithRelations, + WebauthnCredentialsModuleSelect, + WebauthnCredentialsModuleFilter, + WebauthnCredentialsModuleOrderBy, + CreateWebauthnCredentialsModuleInput, + UpdateWebauthnCredentialsModuleInput, + WebauthnCredentialsModulePatch, +} from '../input-types'; +import { connectionFieldsMap } from '../input-types'; +export class WebauthnCredentialsModuleModel { + constructor(private client: OrmClient) {} + findMany( + args: FindManyArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + webauthnCredentialsModules: ConnectionResult< + InferSelectResult + >; + }> { + const { document, variables } = buildFindManyDocument( + 'WebauthnCredentialsModule', + 'webauthnCredentialsModules', + args.select, + { + where: args?.where, + orderBy: args?.orderBy as string[] | undefined, + first: args?.first, + last: args?.last, + after: args?.after, + before: args?.before, + offset: args?.offset, + }, + 'WebauthnCredentialsModuleFilter', + 'WebauthnCredentialsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'WebauthnCredentialsModule', + fieldName: 'webauthnCredentialsModules', + document, + variables, + }); + } + findFirst( + args: FindFirstArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + webauthnCredentialsModules: { + nodes: InferSelectResult[]; + }; + }> { + const { document, variables } = buildFindFirstDocument( + 'WebauthnCredentialsModule', + 'webauthnCredentialsModules', + args.select, + { + where: args?.where, + }, + 'WebauthnCredentialsModuleFilter', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'WebauthnCredentialsModule', + fieldName: 'webauthnCredentialsModules', + document, + variables, + }); + } + findOne( + args: { + id: string; + select: S; + } & StrictSelect + ): QueryBuilder<{ + webauthnCredentialsModule: InferSelectResult | null; + }> { + const { document, variables } = buildFindManyDocument( + 'WebauthnCredentialsModule', + 'webauthnCredentialsModules', + args.select, + { + where: { + id: { + equalTo: args.id, + }, + }, + first: 1, + }, + 'WebauthnCredentialsModuleFilter', + 'WebauthnCredentialsModuleOrderBy', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'query', + operationName: 'WebauthnCredentialsModule', + fieldName: 'webauthnCredentialsModule', + document, + variables, + transform: (data: { + webauthnCredentialsModules?: { + nodes?: InferSelectResult[]; + }; + }) => ({ + webauthnCredentialsModule: data.webauthnCredentialsModules?.nodes?.[0] ?? null, + }), + }); + } + create( + args: CreateArgs & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + createWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildCreateDocument( + 'WebauthnCredentialsModule', + 'createWebauthnCredentialsModule', + 'webauthnCredentialsModule', + args.select, + args.data, + 'CreateWebauthnCredentialsModuleInput', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'WebauthnCredentialsModule', + fieldName: 'createWebauthnCredentialsModule', + document, + variables, + }); + } + update( + args: UpdateArgs< + S, + { + id: string; + }, + WebauthnCredentialsModulePatch + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + updateWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildUpdateByPkDocument( + 'WebauthnCredentialsModule', + 'updateWebauthnCredentialsModule', + 'webauthnCredentialsModule', + args.select, + args.where.id, + args.data, + 'UpdateWebauthnCredentialsModuleInput', + 'id', + 'webauthnCredentialsModulePatch', + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'WebauthnCredentialsModule', + fieldName: 'updateWebauthnCredentialsModule', + document, + variables, + }); + } + delete( + args: DeleteArgs< + { + id: string; + }, + S + > & { + select: S; + } & StrictSelect + ): QueryBuilder<{ + deleteWebauthnCredentialsModule: { + webauthnCredentialsModule: InferSelectResult; + }; + }> { + const { document, variables } = buildDeleteByPkDocument( + 'WebauthnCredentialsModule', + 'deleteWebauthnCredentialsModule', + 'webauthnCredentialsModule', + { + id: args.where.id, + }, + 'DeleteWebauthnCredentialsModuleInput', + args.select, + connectionFieldsMap + ); + return new QueryBuilder({ + client: this.client, + operation: 'mutation', + operationName: 'WebauthnCredentialsModule', + fieldName: 'deleteWebauthnCredentialsModule', + document, + variables, + }); + } +} diff --git a/sdk/constructive-sdk/src/public/orm/mutation/index.ts b/sdk/constructive-sdk/src/public/orm/mutation/index.ts index dfdfb23ab..1cd5aec35 100644 --- a/sdk/constructive-sdk/src/public/orm/mutation/index.ts +++ b/sdk/constructive-sdk/src/public/orm/mutation/index.ts @@ -12,6 +12,9 @@ import type { AcceptDatabaseTransferInput, CancelDatabaseTransferInput, RejectDatabaseTransferInput, + DisconnectAccountInput, + RevokeApiKeyInput, + RevokeSessionInput, VerifyPasswordInput, VerifyTotpInput, SubmitAppInviteCodeInput, @@ -23,9 +26,12 @@ import type { FreezeObjectsInput, InitEmptyRepoInput, ConstructBlueprintInput, + ProvisionNewUserInput, ResetPasswordInput, RemoveNodeAtPathInput, CopyTemplateToBlueprintInput, + CreateApiKeyInput, + ProvisionSpatialRelationInput, BootstrapUserInput, SetFieldOrderInput, ProvisionUniqueConstraintInput, @@ -39,12 +45,12 @@ import type { SetAndCommitInput, ProvisionRelationInput, ApplyRlsInput, - SignInOneTimeTokenInput, + SignInCrossOriginInput, CreateUserDatabaseInput, ExtendTokenExpiresInput, - SignInInput, SignUpInput, - OneTimeTokenInput, + RequestCrossOriginTokenInput, + SignInInput, ProvisionTableInput, SendVerificationEmailInput, ForgotPasswordInput, @@ -56,6 +62,9 @@ import type { AcceptDatabaseTransferPayload, CancelDatabaseTransferPayload, RejectDatabaseTransferPayload, + DisconnectAccountPayload, + RevokeApiKeyPayload, + RevokeSessionPayload, VerifyPasswordPayload, VerifyTotpPayload, SubmitAppInviteCodePayload, @@ -67,9 +76,12 @@ import type { FreezeObjectsPayload, InitEmptyRepoPayload, ConstructBlueprintPayload, + ProvisionNewUserPayload, ResetPasswordPayload, RemoveNodeAtPathPayload, CopyTemplateToBlueprintPayload, + CreateApiKeyPayload, + ProvisionSpatialRelationPayload, BootstrapUserPayload, SetFieldOrderPayload, ProvisionUniqueConstraintPayload, @@ -83,12 +95,12 @@ import type { SetAndCommitPayload, ProvisionRelationPayload, ApplyRlsPayload, - SignInOneTimeTokenPayload, + SignInCrossOriginPayload, CreateUserDatabasePayload, ExtendTokenExpiresPayload, - SignInPayload, SignUpPayload, - OneTimeTokenPayload, + RequestCrossOriginTokenPayload, + SignInPayload, ProvisionTablePayload, SendVerificationEmailPayload, ForgotPasswordPayload, @@ -100,6 +112,9 @@ import type { AcceptDatabaseTransferPayloadSelect, CancelDatabaseTransferPayloadSelect, RejectDatabaseTransferPayloadSelect, + DisconnectAccountPayloadSelect, + RevokeApiKeyPayloadSelect, + RevokeSessionPayloadSelect, VerifyPasswordPayloadSelect, VerifyTotpPayloadSelect, SubmitAppInviteCodePayloadSelect, @@ -111,9 +126,12 @@ import type { FreezeObjectsPayloadSelect, InitEmptyRepoPayloadSelect, ConstructBlueprintPayloadSelect, + ProvisionNewUserPayloadSelect, ResetPasswordPayloadSelect, RemoveNodeAtPathPayloadSelect, CopyTemplateToBlueprintPayloadSelect, + CreateApiKeyPayloadSelect, + ProvisionSpatialRelationPayloadSelect, BootstrapUserPayloadSelect, SetFieldOrderPayloadSelect, ProvisionUniqueConstraintPayloadSelect, @@ -127,12 +145,12 @@ import type { SetAndCommitPayloadSelect, ProvisionRelationPayloadSelect, ApplyRlsPayloadSelect, - SignInOneTimeTokenPayloadSelect, + SignInCrossOriginPayloadSelect, CreateUserDatabasePayloadSelect, ExtendTokenExpiresPayloadSelect, - SignInPayloadSelect, SignUpPayloadSelect, - OneTimeTokenPayloadSelect, + RequestCrossOriginTokenPayloadSelect, + SignInPayloadSelect, ProvisionTablePayloadSelect, SendVerificationEmailPayloadSelect, ForgotPasswordPayloadSelect, @@ -156,6 +174,15 @@ export interface CancelDatabaseTransferVariables { export interface RejectDatabaseTransferVariables { input: RejectDatabaseTransferInput; } +export interface DisconnectAccountVariables { + input: DisconnectAccountInput; +} +export interface RevokeApiKeyVariables { + input: RevokeApiKeyInput; +} +export interface RevokeSessionVariables { + input: RevokeSessionInput; +} export interface VerifyPasswordVariables { input: VerifyPasswordInput; } @@ -188,11 +215,14 @@ export interface InitEmptyRepoVariables { } /** * Variables for constructBlueprint - * Executes a blueprint definition by delegating to provision_* procedures. Creates a blueprint_construction record to track the attempt. Five phases: (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. Table-level indexes/fts/unique_constraints are deferred to phases 3-5 so they can reference columns created by relations in phase 2. Tables are identified by table_name with optional per-table schema_name. Relations use $type for relation_type with source_table/target_table. Returns the construction record ID on success, NULL on failure. + * 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. */ export interface ConstructBlueprintVariables { input: ConstructBlueprintInput; } +export interface ProvisionNewUserVariables { + input: ProvisionNewUserInput; +} export interface ResetPasswordVariables { input: ResetPasswordInput; } @@ -206,6 +236,16 @@ export interface RemoveNodeAtPathVariables { export interface CopyTemplateToBlueprintVariables { input: CopyTemplateToBlueprintInput; } +export interface CreateApiKeyVariables { + input: CreateApiKeyInput; +} +/** + * Variables for provisionSpatialRelation + * Idempotent provisioner for metaschema_public.spatial_relation. Inserts a row declaring a spatial predicate between two geometry/geography columns (owner and target). Called from construct_blueprint when a relation entry has $type=RelationSpatial. Graceful: re-running with the same (source_table_id, name) returns the existing id without modifying the row. Operator whitelist and st_dwithin ↔ param_name pairing are enforced by the spatial_relation table CHECKs. Both fields must already exist — this is a metadata-only insert. + */ +export interface ProvisionSpatialRelationVariables { + input: ProvisionSpatialRelationInput; +} export interface BootstrapUserVariables { input: BootstrapUserInput; } @@ -261,8 +301,8 @@ export interface ProvisionRelationVariables { export interface ApplyRlsVariables { input: ApplyRlsInput; } -export interface SignInOneTimeTokenVariables { - input: SignInOneTimeTokenInput; +export interface SignInCrossOriginVariables { + input: SignInCrossOriginInput; } /** * Variables for createUserDatabase @@ -289,14 +329,14 @@ export interface CreateUserDatabaseVariables { export interface ExtendTokenExpiresVariables { input: ExtendTokenExpiresInput; } -export interface SignInVariables { - input: SignInInput; -} export interface SignUpVariables { input: SignUpInput; } -export interface OneTimeTokenVariables { - input: OneTimeTokenInput; +export interface RequestCrossOriginTokenVariables { + input: RequestCrossOriginTokenInput; +} +export interface SignInVariables { + input: SignInInput; } /** * Variables for provisionTable @@ -487,6 +527,93 @@ export function createMutationOperations(client: OrmClient) { 'RejectDatabaseTransferPayload' ), }), + disconnectAccount: ( + args: DisconnectAccountVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + disconnectAccount: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'DisconnectAccount', + fieldName: 'disconnectAccount', + ...buildCustomDocument( + 'mutation', + 'DisconnectAccount', + 'disconnectAccount', + options.select, + args, + [ + { + name: 'input', + type: 'DisconnectAccountInput!', + }, + ], + connectionFieldsMap, + 'DisconnectAccountPayload' + ), + }), + revokeApiKey: ( + args: RevokeApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeApiKey', + fieldName: 'revokeApiKey', + ...buildCustomDocument( + 'mutation', + 'RevokeApiKey', + 'revokeApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeApiKeyInput!', + }, + ], + connectionFieldsMap, + 'RevokeApiKeyPayload' + ), + }), + revokeSession: ( + args: RevokeSessionVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + revokeSession: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'RevokeSession', + fieldName: 'revokeSession', + ...buildCustomDocument( + 'mutation', + 'RevokeSession', + 'revokeSession', + options.select, + args, + [ + { + name: 'input', + type: 'RevokeSessionInput!', + }, + ], + connectionFieldsMap, + 'RevokeSessionPayload' + ), + }), verifyPassword: ( args: VerifyPasswordVariables, options: { @@ -806,6 +933,35 @@ export function createMutationOperations(client: OrmClient) { 'ConstructBlueprintPayload' ), }), + provisionNewUser: ( + args: ProvisionNewUserVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + provisionNewUser: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ProvisionNewUser', + fieldName: 'provisionNewUser', + ...buildCustomDocument( + 'mutation', + 'ProvisionNewUser', + 'provisionNewUser', + options.select, + args, + [ + { + name: 'input', + type: 'ProvisionNewUserInput!', + }, + ], + connectionFieldsMap, + 'ProvisionNewUserPayload' + ), + }), resetPassword: ( args: ResetPasswordVariables, options: { @@ -893,6 +1049,64 @@ export function createMutationOperations(client: OrmClient) { 'CopyTemplateToBlueprintPayload' ), }), + createApiKey: ( + args: CreateApiKeyVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + createApiKey: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'CreateApiKey', + fieldName: 'createApiKey', + ...buildCustomDocument( + 'mutation', + 'CreateApiKey', + 'createApiKey', + options.select, + args, + [ + { + name: 'input', + type: 'CreateApiKeyInput!', + }, + ], + connectionFieldsMap, + 'CreateApiKeyPayload' + ), + }), + provisionSpatialRelation: ( + args: ProvisionSpatialRelationVariables, + options: { + select: S; + } & StrictSelect + ) => + new QueryBuilder<{ + provisionSpatialRelation: InferSelectResult | null; + }>({ + client, + operation: 'mutation', + operationName: 'ProvisionSpatialRelation', + fieldName: 'provisionSpatialRelation', + ...buildCustomDocument( + 'mutation', + 'ProvisionSpatialRelation', + 'provisionSpatialRelation', + options.select, + args, + [ + { + name: 'input', + type: 'ProvisionSpatialRelationInput!', + }, + ], + connectionFieldsMap, + 'ProvisionSpatialRelationPayload' + ), + }), bootstrapUser: ( args: BootstrapUserVariables, options: { @@ -1270,33 +1484,33 @@ export function createMutationOperations(client: OrmClient) { 'ApplyRlsPayload' ), }), - signInOneTimeToken: ( - args: SignInOneTimeTokenVariables, + signInCrossOrigin: ( + args: SignInCrossOriginVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signInOneTimeToken: InferSelectResult | null; + signInCrossOrigin: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignInOneTimeToken', - fieldName: 'signInOneTimeToken', + operationName: 'SignInCrossOrigin', + fieldName: 'signInCrossOrigin', ...buildCustomDocument( 'mutation', - 'SignInOneTimeToken', - 'signInOneTimeToken', + 'SignInCrossOrigin', + 'signInCrossOrigin', options.select, args, [ { name: 'input', - type: 'SignInOneTimeTokenInput!', + type: 'SignInCrossOriginInput!', }, ], connectionFieldsMap, - 'SignInOneTimeTokenPayload' + 'SignInCrossOriginPayload' ), }), createUserDatabase: ( @@ -1357,91 +1571,91 @@ export function createMutationOperations(client: OrmClient) { 'ExtendTokenExpiresPayload' ), }), - signIn: ( - args: SignInVariables, + signUp: ( + args: SignUpVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signIn: InferSelectResult | null; + signUp: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignIn', - fieldName: 'signIn', + operationName: 'SignUp', + fieldName: 'signUp', ...buildCustomDocument( 'mutation', - 'SignIn', - 'signIn', + 'SignUp', + 'signUp', options.select, args, [ { name: 'input', - type: 'SignInInput!', + type: 'SignUpInput!', }, ], connectionFieldsMap, - 'SignInPayload' + 'SignUpPayload' ), }), - signUp: ( - args: SignUpVariables, + requestCrossOriginToken: ( + args: RequestCrossOriginTokenVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - signUp: InferSelectResult | null; + requestCrossOriginToken: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'SignUp', - fieldName: 'signUp', + operationName: 'RequestCrossOriginToken', + fieldName: 'requestCrossOriginToken', ...buildCustomDocument( 'mutation', - 'SignUp', - 'signUp', + 'RequestCrossOriginToken', + 'requestCrossOriginToken', options.select, args, [ { name: 'input', - type: 'SignUpInput!', + type: 'RequestCrossOriginTokenInput!', }, ], connectionFieldsMap, - 'SignUpPayload' + 'RequestCrossOriginTokenPayload' ), }), - oneTimeToken: ( - args: OneTimeTokenVariables, + signIn: ( + args: SignInVariables, options: { select: S; - } & StrictSelect + } & StrictSelect ) => new QueryBuilder<{ - oneTimeToken: InferSelectResult | null; + signIn: InferSelectResult | null; }>({ client, operation: 'mutation', - operationName: 'OneTimeToken', - fieldName: 'oneTimeToken', + operationName: 'SignIn', + fieldName: 'signIn', ...buildCustomDocument( 'mutation', - 'OneTimeToken', - 'oneTimeToken', + 'SignIn', + 'signIn', options.select, args, [ { name: 'input', - type: 'OneTimeTokenInput!', + type: 'SignInInput!', }, ], connectionFieldsMap, - 'OneTimeTokenPayload' + 'SignInPayload' ), }), provisionTable: ( diff --git a/sdk/constructive-sdk/src/public/orm/query/index.ts b/sdk/constructive-sdk/src/public/orm/query/index.ts index 424b81e24..d79ab541d 100644 --- a/sdk/constructive-sdk/src/public/orm/query/index.ts +++ b/sdk/constructive-sdk/src/public/orm/query/index.ts @@ -17,6 +17,9 @@ import type { AppLevelRequirementConnection, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; +export interface RequireStepUpVariables { + stepUpType?: string; +} export interface AppPermissionsGetPaddedMaskVariables { mask?: string; } @@ -32,6 +35,15 @@ export interface RevParseVariables { storeId?: string; refname?: string; } +/** + * Variables for resolveBlueprintField + * Resolves a field_name within a given table_id to a field_id. Throws if no match is found. Used by construct_blueprint to translate user-authored field names (e.g. "location") into field UUIDs for downstream provisioning procedures. table_id must already be resolved (via resolve_blueprint_table) before calling this. + */ +export interface ResolveBlueprintFieldVariables { + databaseId?: string; + tableId?: string; + fieldName?: string; +} export interface OrgIsManagerOfVariables { pEntityId?: string; pManagerId?: string; @@ -152,6 +164,25 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + currentUserAgent: (options?: { select?: Record }) => + new QueryBuilder<{ + currentUserAgent: string | null; + }>({ + client, + operation: 'query', + operationName: 'CurrentUserAgent', + fieldName: 'currentUserAgent', + ...buildCustomDocument( + 'query', + 'CurrentUserAgent', + 'currentUserAgent', + options?.select, + undefined, + [], + connectionFieldsMap, + undefined + ), + }), currentIpAddress: (options?: { select?: Record }) => new QueryBuilder<{ currentIpAddress: string | null; @@ -171,21 +202,31 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), - currentUserAgent: (options?: { select?: Record }) => + requireStepUp: ( + args: RequireStepUpVariables, + options?: { + select?: Record; + } + ) => new QueryBuilder<{ - currentUserAgent: string | null; + requireStepUp: boolean | null; }>({ client, operation: 'query', - operationName: 'CurrentUserAgent', - fieldName: 'currentUserAgent', + operationName: 'RequireStepUp', + fieldName: 'requireStepUp', ...buildCustomDocument( 'query', - 'CurrentUserAgent', - 'currentUserAgent', + 'RequireStepUp', + 'requireStepUp', options?.select, - undefined, - [], + args, + [ + { + name: 'stepUpType', + type: 'String', + }, + ], connectionFieldsMap, undefined ), @@ -318,6 +359,43 @@ export function createQueryOperations(client: OrmClient) { undefined ), }), + resolveBlueprintField: ( + args: ResolveBlueprintFieldVariables, + options?: { + select?: Record; + } + ) => + new QueryBuilder<{ + resolveBlueprintField: string | null; + }>({ + client, + operation: 'query', + operationName: 'ResolveBlueprintField', + fieldName: 'resolveBlueprintField', + ...buildCustomDocument( + 'query', + 'ResolveBlueprintField', + 'resolveBlueprintField', + options?.select, + args, + [ + { + name: 'databaseId', + type: 'UUID', + }, + { + name: 'tableId', + type: 'UUID', + }, + { + name: 'fieldName', + type: 'String', + }, + ], + connectionFieldsMap, + undefined + ), + }), orgIsManagerOf: ( args: OrgIsManagerOfVariables, options?: {